Plex Media and file permissions

Status
Not open for further replies.

alexg

Contributor
Joined
Nov 29, 2013
Messages
197
My NAS is setup with CIFS shares and only accessible to users in group "shareusers". "everyone" access is shutdown. Unfortunately, Plex does not see the media unless I allow everyone rx access to media files and directories. I would assume Plex jail runs under UID that is not able to access these files.

Is there a strategy on how to do this without enabling everyone read access?

Thanks
 

alexg

Contributor
Joined
Nov 29, 2013
Messages
197
I came up with solution to this. Unfortunately due to numerous issues with CIFS permissions in 9.2.1.3, I had to use setfacl from shell. Here is how I did this from shell

Locate PMS jail number and substitute in my command example:

Code:
jls
jexec <x> /bin/sh
cat /etc/passwd
exit


Note uid and gid for user plex

Using FreeNAS web GUI in FreeNAS machine, added plex ID with same uid and gid

Restart PMS jail. "ps aux" should now show that this jail runs under user id of "plex".

From FreeNAS machine shell, change directory to my media folder in FreeNAS machine that is mounted in PMS jail and add plex permission for read/read+execute/list directory.

Code:
cd /mnt/tank/shares/Media
 
find ./ -type file -exec setfacl -m user:plex:r-x---a-R-c---:------:allow {} \;
find ./ -type d -exec setfacl -m user:plex:r-x---a-R-c---:fd----:allow {} \;
 


Go to plex's web page and refresh your media.
 

itskando

Contributor
Joined
Apr 30, 2018
Messages
172
Note uid and gid for user plex

Using FreeNAS web GUI in FreeNAS machine, added plex ID with same uid and gid

Plex's default UID and GID are 972.
freeNAS doesn't let me set GID and it always starts above 1000.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
And this thread is over 4 years old that your posting on......
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Holy mother of necropost!

If you're having a problem, please start a new thread and carefully explain what steps you took to get to where you are.
 
Status
Not open for further replies.
Top