Bind Mount (LXC) Group Write Permissions

FortySixanTwo

New Member
Jan 28, 2024
1
0
1
Hi all,

I have several containers 100-106, with gid 1001 'media' and uids 1000-1010 mapped. I have a 'media' folder bind mounted in each at /mnt/shared/media.
Jellyfin, Radarr, etc, which are using users that I've added to the mapped media group & given mapped uids, all report that they do not have write permission in the media folder.
However if I log into the user accounts they use in shell I'm able to read, modify, and add files in the mounted directories.
Code:
root@radarr:~# su -s /bin/bash radarr
radarr@radarr:/root$ ls -l /mnt/shared/media
total 16
drwxrwxr-x 93 1000 media 12288 Jan 28 20:54 Film
drwxrwxr-x 32 1000 media  4096 Jan  6 20:57 TV

radarr@radarr:/root$ touch /mnt/shared/media/hi.txt
radarr@radarr:/root$ ls -l /mnt/shared/media
total 16
drwxrwxr-x 93   1000 media 12288 Jan 28 20:54 Film
drwxrwxr-x 32   1000 media  4096 Jan  6 20:57 TV
-rw-r--r--  1 radarr media     0 Jan 28 20:54 hi.txt

radarr@radarr:/root$ rm /mnt/shared/media/hi.txt
radarr@radarr:/root$ ls -l /mnt/shared/media
total 16
drwxrwxr-x 93 1000 media 12288 Jan 28 20:54 Film
drwxrwxr-x 32 1000 media  4096 Jan  6 20:57 TV
Mappings are correct as the owner shows as 1000 and not 'nobody', the group is also good, permissions are set to group rwx recursively. The user created for the services to use can write within the folders.
But Jellyfin's WebUI gives me permissions errors when I try to delete items. Radarr wont use the mounted drive as a root as it claims it doesn't have write access.

The only LXC I have that (I think?) has working write permissions is Turnkey Fileserver, as I can read/write in the folders via the network drive on my Windows desktop.

I'm really lost, does anyone have any ideas? Only thing I can think of at this point is that maybe Turnkey has set some restrictions? Or maybe the services aren't using the account I set them up to use?

Edit: I forgot to say that Jellyfin can delete files if I change the owner to 'jellyfin' for the file and the containing folder. This seems like sticky bit behaviour, but I don't have that set.


Edit 2:
The issue definitely stems from the group write permission. It's being ignored. If I `chown -R 777` the mounted directories then all of these applications in lxcs know they have write access, despite ls -l and the passwd file showing the directories & files being owned by 'media' and the users belonging to the 'media' group.
 
Last edited:

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!