Bind mount drives and differing permissions for different LXCs

Birchman

New Member
Dec 14, 2024
1
0
1
So I'm setting up my home NAS currently. I'm using 2 drives with ZFS which was set up using the GUI on the Proxmox host.

I've bind mounted the ZFS pool to a LXC container using this line in the LXC .conf file:
mp0: /naspool,mp=/mnt/naspool

On the LXC I then set up Samba (after creating a new user specifically for Samba).

On my home computer in Windows I then mapped the Samba drive. However I couldn't write to the shared drive, so on the Proxmox host I did chmod 777 to the ZFS pool... then I could write to the drive via Samba.

Is this the proper way to do it? Or is there a better and more secure way?

I want to make some more LXC containers and VMs which will have Jellyfin and some other services that can access the ZFS pool... but I don't want these other services to write to the ZFS pool, only the read from it. I only want my LXC which has Samba and Filebrowser to be able to write to it.

How can I make it so that the ZFS pool is bind mounted to all the LXC containers, but only specific LXC containers have full access (read/write) while others can only read from it?
 

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!