At my wit's end with unprivileged LXC NFS mounts

Valcorb

New Member
Dec 26, 2024
1
0
1
Hello everyone,

I'm currently at my wit's end and looking for help to figure out what I am doing wrong.
I installed the Tteck Plex LXC helper script from Github in an unprivileged LXC.
I have mounted an NFS drive on the Proxmox host containing data on it which I want to use on the LXC:
<internal-ip>:/media/hdd1/nfs /mnt/nfs/ nfs4 soft,noatime,async,rsize=131072,wsize=131072,timeo=30,retrans=3,vers=4.2,tcp,nofsc 0 0
I want to mount this directory in the LXC, so I add this to the LXC conf file:
mp0: /mnt/nfs/,mp=/mnt/nfs/

This makes the folder accessible, but I can't write anything in it. Looking at the permissions, it's all owned by nobody:nogroup.
Went looking for a solution and tried ID mappings, but they confuse me a lot.
I have a user called "server" with ID 1000 and a group called "nfsshare" with ID 1003. Both server user and root user are part of the nfsshare group.
I've created the same group with the same ID on the LXC and added the root user to the group. I then tried to use ID mapping in the conf file, but it was not a success. I mostly run into permission issues where my whole LXC does not work due to file permission errors because the wrong bindings.

my /etc/subuid file:
Code:
root:100000:65536
server:165536:65536

my /etc/subgid file:
Code:
root:100000:65536
server:165536:65536

I really don't want to use privileged mode as I understand the security risks, but I have been struggling with this for 2 days and haven't found any solution.
I hope you can help me to provide the correct ID mappings.

Thanks! Please let me know if you need more information.
 

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!