R
R
Roma2020-05-05 14:54:35
System administration
Roma, 2020-05-05 14:54:35

How to share a folder into an unprivileged lxc container?

There is a server with proxmox
An lxc container is created, a host folder

inside the container is mounted to it, this folder has the owner nobody:nogroup

cat /etc/{subuid,subgid}


root:100000:65536
root:100000:65536


added to lxc config
lxc.idmap = u 0 100000 65536
lxc.idmap = g 0 100000 65536


the folder is still nobody:nogroup, what am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roma, 2020-05-05
@aaallllsss

for people like me
add to /etc/{subuid,subgid}

root:0:1

0 - folder owner id
add to lxc config(/etc/pve/lxc/100.conf)
lxc.idmap: u 0 0 1
lxc.idmap: g 0 0 1
lxc.idmap: u 1 100000 65536
lxc.idmap: g 1 100000 65536

probably not the best option, but it works

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question