UID/GID Mapping not working in NFS share for unprivileged LXC

mon0

New Member
Dec 16, 2023
9
1
3
Howdy folks,

Brand new Proxmox user and I've hit a roadblock with NFS shares in an unprivileged LXC container. I've been trying to bind mount and map based off this guide. My UID/GID 3000 mapping in the VM confs look like this:

Code:
...
lxc.idmap = u 0 100000 3000
lxc.idmap = g 0 100000 3000
lxc.idmap = u 3000 3000 1
lxc.idmap = g 3000 3000 1
lxc.idmap = u 3001 103001 62534
lxc.idmap = g 3001 103001 62534

I also updated /etc/subuid and /etc/subgid on the host with root:3000:1

Even after restarting the containers, I still get permission denied when trying to cd into the mounted folders. I’m as root in the container (UID 0). NFS seems correctly set, and the folders get the 3000:3000 uid:gid, but something is going wrong with the root to 3000 mapping and I'm not quite sure what it is. It's been a while since I've been this deep in Linux so my diagnosing skills are lacking a bit here.

Any tips or similar experiences would be super helpful!

Thanks!
 

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!