Plex Plugin: Permissions

Status
Not open for further replies.

Nikkiez

Cadet
Joined
Jun 14, 2014
Messages
3
Hey Guys,
I have a question about the Plex plugin and file permissions. Until now I have done the following steps.

1. I created a user "nasuser".
2. I created a user "nasadmin".
3. I created a dataset for my media like music and videos.
4.I gave this dataset the following permissions.

owner: nasadmin
group: nasuser
permissions: 770
The nasadmin to controll all shares and the nasuser only for the media share/dataset.

5. I copied my media data by samba to the dataset.
6. I installed Plex mediaserver plugin.
7. I created a new folder "media" inside the plugin jail under /mnt/.
8. I added the jail storage from my freenas media dataset to the new created media folder.
By now everything looks fine. In the shell I can see all my files in the storage/mount.
9. I stated the Plex plugin and I tried to add a library. But I can't see the files from the mount.

After some testing and investigation I found out that I need to set the following permissions to see the media files/folders.
owner: nasadmin
group: nasuser
permissions: 775
But now other can read and execute files at this dataset. That's not in my interest.

Is there a solution to use media files with Plex without setting the permissions for other?

I hope my question is understandable. Thanks for your help.

Best
Nikkiez
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
plex uses the 'plex' user in the jails userland. the user you have in freenas is not synced to the jails userland and likely only seen as a uid/gid.

you can create a group in the jail with the matching gid, add the plex user to that group, and change the permission of those files to 640. that way the owner can read/write, group members can read, and others can't do anything.

adding the group in the jail, and plex to that group likely needs to be done on the command line. for extra procaution you can make the mount into the plex jail read only.

BTW, the user/group writing those files is likely 'media' with uid/gid=816
 
Status
Not open for further replies.
Top