NFS mount inside an unprivileged container

Oct 3, 2019
18
0
6
32
Hello,

I have an NFS share mounted to proxmox host and I want to mount that share from host to an unprivileged container.
So I added a line "mp0: /location/on/host,mp=/location/on/container"
In privileged mode everything works and permissions are ok.
When I switch to unprivileged mode permissions become "nobody:nogroup".

Should I manually add mapping to the config?
I tried adding mapping like it's explained here: https://pve.proxmox.com/wiki/Unprivileged_LXC_containers
Code:
lxc.idmap = u 0 100000 65536
lxc.idmap = g 0 100000 65536

But it didn't change anything.

Am I doing something wrong and is it even possible to mount NFS inside an unprivileged container with normal uid/gid mappings?


Thank you for all the suggestions in advance
 
hi,

you have to change the owners of the files, so that the unprivileged mapped uid/gid can access it.
 
hi,

you have to change the owners of the files, so that the unprivileged mapped uid/gid can access it.

Hello oguz!
Thank you very much for the reply!

So that would mean I won't be able to use that shared directory from the host itself, right?
Is there a way I can use it on both proxmox host (where uid/gid would be from 0 to 65536) and inside the containers (where uid/gid would be from 100000 to 165536)?
 

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!