All of my media content is in /home/media and owned by media:media. By default, PMS runs as plex. I have three options for making sure PMS can see content:
Better solution: Move your media to a different location. anything in /home is going to cause long term headaches. create a new /multimedia directory or similar and move it there.
Do you use the media user for anything else other than to own the files? Because if that’s the case just remove that user and chown that whole home directory to be owned by plex:plex instead.
That’s the ID all my downloaders use. I could, I suppose, have them use plex.
Can you give me an example of an issue I might have? /home/media is only used by media downloaders and Plex. media and plex have no access to anything outside of /home/media. So what could go wrong?
I basically mount my big disk (4 TB) as /home so all my user files are created in it. This is because I have some automatic backups of my big disk.
Often Linux will change permissions/block access to files in other /home folders. This could be during an OS upgrade/update or just random. Ive seen it happen fairly frequently in threads on this board.
There are ways to mitigate that, but those can cause additional issues (See threads about constant scanning).
In the VM, you set perms “755” (which mask to 644 for files)
-and/or-
On the native host, you set setgid inheritance (‘g+s’) and set it the first time
– From that point forward. anything written will receive permissions of the parent (which you’ve set)
FWIW: I hate docker. I do use LXC. The power of a full host without the overhead of a VM
Using setfacl should be perfectly acceptable in this case. The example you linked applies permissions specifically for a group; however, you could instead set them for just the plex user by using u: instead of g:. I generally use that form unless I know for certain that either I’ll never add any additional users to the specified group or, if I do, that they should also have access to the resource.
Sometimes the best solution isn’t to do what you’ve always done, but to use the most suitable tool available to you for a specific task. ACLs have been present in Linux for more than twenty years at this point; learn to use them or don’t. They’re very expressive and granular, and suitable for some situations where traditional ownership and permissions just don’t work. For example, allowing access (or specific types of access) without changing user/group ownership.