Hi everyone,
So I've been following various tutorials and forum/Reddit posts regarding UID/GID mapping (including Proxmox's support page). I got it mostly working but there are still some things that don't work exactly as I would want.
I'll recap what I've done. On my host, I added the following to /etc/subgid:
root:1005:1
I also created the group lxc-user with GID 1005 and added root to it.
I created directory /rpool/media/data and ran the following:
In the settings of my LXC, I've added the following from the Proxmox help:
Within the LXC itself, I created group lxc-user with GID 1005 and added root to it.
Now if I create a a file called test.txt from the host, in the LXC if I do ls -l this is what I see:
If I try to edit the file from the LXC, it tells me that it is unwritable. However, I am able to delete it.
If I create a file in the folder FROM the LXC, another LXC with the same bind mount will be able to edit it.
Any idea what I'm doing wrong here?
Thanks for your help!
So I've been following various tutorials and forum/Reddit posts regarding UID/GID mapping (including Proxmox's support page). I got it mostly working but there are still some things that don't work exactly as I would want.
I'll recap what I've done. On my host, I added the following to /etc/subgid:
root:1005:1
I also created the group lxc-user with GID 1005 and added root to it.
I created directory /rpool/media/data and ran the following:
Code:
chgrp 1005 /rpool/media/data
chmod -R g+rw /rpool/media/data
chmod g+s /rpool/media/data
In the settings of my LXC, I've added the following from the Proxmox help:
Code:
mp0: /rpool/media/data,mp=/mnt/media
lxc.idmap: g 0 100000 1005
lxc.idmap: g 1005 1005 1
lxc.idmap: g 1006 101006 64530
Within the LXC itself, I created group lxc-user with GID 1005 and added root to it.
Now if I create a a file called test.txt from the host, in the LXC if I do ls -l this is what I see:
Code:
-rw-r--r-- 1 nobody lxc-user 6 May 2 07:24 test.txt
If I try to edit the file from the LXC, it tells me that it is unwritable. However, I am able to delete it.
If I create a file in the folder FROM the LXC, another LXC with the same bind mount will be able to edit it.
Any idea what I'm doing wrong here?
Thanks for your help!
Last edited: