LXC Group Mapping

548901239

Member
Jan 16, 2022
3
0
6
44
Hi, I'm having trouble configuring group mapping for zfs mount access in my unprivileged LXC.

I have a directory /zpool/media/ on the host which I passed to the container with a mount point at /mnt/media.

On the host:
  • The directory is owned by user root (uid=0) and group media (gid=1000).
  • Permissions are 770 on the directory
  • I have created user jellyfin (uid=1100) which is a member of the "media" group
On the LXC guest:
  • I am using the root user.
  • uid 0 (root) is mapped to uid 1100 on the host (jellyfin user)
  • I have created a group media here as well with gid=1000 and added the root LXC user to it
  • gid 1000 (media) is mapped to gid 1000 on the host (media group)
With all of this configured, I can see the mount point inside the LXC with the correct group permission. However I am unable to enter the directory. Am I missing anything else? I created a test directory inside the LXC with the same permissions and I can enter that one.

rich text editor image

My uid/gid mapping in the lxc config:

lxc.idmap: u 0 1100 1
lxc.idmap: u 1 100000 65535
lxc.idmap: g 0 100000 1000
lxc.idmap: g 1000 1000 1
lxc.idmap: g 1001 101001 64534
If I map the root group (gid=0) in LXC to media group on the host it works. However I would like to get this working from the media group inside the LXC.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!