What is the best right way to give the plex user access to media in anoter user's home folder?

I am running PMS direclty on Linux.

My media is in /home/me/media. Plex is running as the user plex.

The plex user obviously does not have access to /home/me/...

I know the general response is to chmod the media folder to 777 or some crap like that but that’s not right/good.

My current thought is to add the plex user to the me GROUP – since all of the files in /home/me/media will have me as the GROUP.

But I’m wondering what others are doing or what their thoughts are.

Adding plex to your group (or creating a new group entirely for this purpose and adding your user and plex) and setting the desired group ownership permissions are probably the simplest way of accomplishing this. Aside from the wide open permissions you mentioned, of course.

However, I like ACLs for problems like these. They allow you to specify very targeted permissions for a specific user, while leaving intact the traditional Unix permissions. Something like:

setfacl -R -d -m u:plex:rwx /home/me/media

This will recursively set the ACLs for the files/directories in the specified path to allow user plex to read, write, and execute. This may not be appropriate in all circumstances; find with -type and -exec would be helpful here (and removing the from the setfacl command).

As far as I remember, you should create a totally separate location for your Plex media. Never tie them into your home folder.

Will this also automatically apply for new files/folders created?

I could do that. I’m debating redoing my whole setup.

Yes, it will.

I did this but plex still cannot access the folder.

sudo setfacl -Rm d:u:plex:rwx,u:plex:rwx /data/entertainment/media

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.