[SOLVED] UID/GID Mapping and NFS Share Access in 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 {id}.conf looks 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 get permission denied when trying to cd into the mounted folders 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!
 
both these threads can be deleted, my issue was specifically with not having Mapall set in the NFS share settings for TrueNAS to the correct UID
 

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!