Big Edit:
Hi,
I found this tutorial on how to mount directories to a container: https://pve.proxmox.com/wiki/Unprivileged_LXC_containers
Consider the following case:
One container has two users named "a" and "b".
The same users exist on the host system.
They use the following ids:
LXC:
a: uid=1000; gid=1000
b: uid: 109; gid=115
Host:
a: uid=1010; gid=1010
b: uid=1011; gid=1011
My config files looks like this:
/etc/subuid:
/etc/subgid:
This mapping relects only user b and is not working correct.
The container starts and afterwards on the lcx all internal folders belonging to user b are owned by nobody. After removing the lxc.idmap lines, this is fixed but then the mapping between host and lxc is missing again.
What is the problem here and how would a correct mapping for users a and b be?
Thank you very much!
Hi,
I found this tutorial on how to mount directories to a container: https://pve.proxmox.com/wiki/Unprivileged_LXC_containers
Consider the following case:
One container has two users named "a" and "b".
The same users exist on the host system.
They use the following ids:
LXC:
a: uid=1000; gid=1000
b: uid: 109; gid=115
Host:
a: uid=1010; gid=1010
b: uid=1011; gid=1011
My config files looks like this:
Code:
arch: amd64
cores: 2
hostname: dummy
memory: 1024
mp0: /megaraid/sb/dummy,mp=/mnt/dummy
net0: name=eth0,bridge=vmbr0,firewall=1,gw=141.241.31.33,hwaddr=0A:F1:5E:B1:70:$
ostype: ubuntu
rootfs: local-zfs:subvol-101-disk-0,size=30G
swap: 1024
unprivileged: 1
lxc.idmap: u 0 100000 109
lxc.idmap: g 0 100000 115
lxc.idmap: u 109 1011 1
lxc.idmap: g 115 1011 1
lxc.idmap: u 110 100110 65426
lxc.idmap: g 116 100116 65420
/etc/subuid:
Code:
root:1011:1
root:1010:1
root:100000:65536
a:362144:65536
b:493216:65536
/etc/subgid:
Code:
root:1011:1
root:1010:1
root:100000:65536
a:362144:65536
b:493216:65536
This mapping relects only user b and is not working correct.
The container starts and afterwards on the lcx all internal folders belonging to user b are owned by nobody. After removing the lxc.idmap lines, this is fixed but then the mapping between host and lxc is missing again.
What is the problem here and how would a correct mapping for users a and b be?
Thank you very much!
Last edited: