Hello,
I don't understand the mapping of the UID and GID. It seems so simple but did not work for me.
After reading https://pve.proxmox.com/wiki/Unprivileged_LXC_containers I tried to configure my container for my needs:
For my user bernd UID and GID is 1000 (in my whole network on every device, including PVE host). In addition in network I created a group "shares" with GID 1002. This is for simple access. User bernd is in this group.
After adding the mappings, I log in as bernd. The permissions of my home dir are nobody:bernd instead of expected bernd:bernd but the mountpoint is correct - bernd:shares.
Where is my fault?
1. My /etc/subuid:
2. My /etc/subgid:
3. My /etc/lxc/1xx.conf:
I don't understand the mapping of the UID and GID. It seems so simple but did not work for me.
After reading https://pve.proxmox.com/wiki/Unprivileged_LXC_containers I tried to configure my container for my needs:
For my user bernd UID and GID is 1000 (in my whole network on every device, including PVE host). In addition in network I created a group "shares" with GID 1002. This is for simple access. User bernd is in this group.
After adding the mappings, I log in as bernd. The permissions of my home dir are nobody:bernd instead of expected bernd:bernd but the mountpoint is correct - bernd:shares.
Where is my fault?
1. My /etc/subuid:
Code:
root:100000:65536
bernd:165536:65536
root:1000:1 # <-- this was added by me after reading tutorials
2. My /etc/subgid:
Code:
root:100000:65536
bernd:165536:65536
root:1002:1 # <!-- this was added by me
3. My /etc/lxc/1xx.conf:
Code:
...
unprivileged: 1
...
mp0: /mnt/data,mp=/mnt/data
...
lxc.idmap: u 0 100000 1000
lxc.idmap: g 0 100000 1002
lxc.idmap: u 1000 1000 1
lxc.idmap: g 1002 1002 1
lxc.idmap: u 1001 101001 64534
lxc.idmap: g 1003 101003 64532