LXC Bind mount points shared with a group rather individual users?

esologic

New Member
May 3, 2021
3
0
1
29
I'm trying to share a directory on my host with an LXC container. I found this guide: https://pve.proxmox.com/wiki/Unprivileged_LXC_containers

From what I can tell, this looks like for every user I create inside of the LXC container, I have to repeat the process to add them to read/write access for the shared directory.

This isn't ideal for my use case. Would it be possible to create a group on the host, a mapping to this group inside the container, and then create new users within that group inside of the container that would all have read/write permissions to my shared directory by virtue of being in the special group?

Thank you.
 
Yes this is actually set up in the instructions you linked. In that tutorial, the 'g's in the mapping map that gid on the host system to the guest. And appending the line to /etc/subgid allows whatever group you stated to operate under that id.
 
This idmapping did not work for me at all. At one point the whole server crashed.

What is the minimal config to have one user in a n lxc container write to a mounted disc.
I only care about the lxc id. What ever id are used on the host is fine.
 

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!