Plex Permissions Issues

Joined
Jul 20, 2014
Messages
22
I am having issues with my Plex installation. I am adding a new Dataset for a new library to an existing Plex plugin installation. I am running on FreeNAS-11.3-U4.1. The Plex plugin is using a FreeBSD 11.3-RELEASE-p11 jail and is running Plex version 1.20.2.3370. I created a brand new dataset called NewMedia (/NASDrives/NewMedia). In that dataset I created a child dataset called Videos (/NASDrives/NewMedia/Videos). On the NewMedia dataset I edited the ACL and removed the owner@, group@ and everyone@ ACL entries and added a 'User' ACL entry for '972' and group ACL entry for '972'. I checked the checkboxes for 'Apply Permissions Recursively' and 'Apply Permissions to Child Datasets' and clicked 'Save'.

Then I shutdown the jail and added a mount point (/mnt/NewMedia) pointing to the NewMedia dataset (/NASDrives/NewMedia) and then started the jail back up again.

Next I logged into the Plex web interface and added a new library that is pointed at the Video dataset within the NewMedia dataset. I then went to add the library to be available to my user in Plex and went to the library to view the contents. There were no media files listed. I went to the library and tried to have it manually scan the library for media, but nothing was found.

I logged into the jail using the root account and navigated to the mount point within the jail (/mnt/NewMedia/Videos) and saw that there was no media listed in the directory. Then I logged into the FreeNAS via SSH using an admin account navigated to the dataset path (/NASDrives/NewMedia/Videos) and there was media files in the directory. I went back to Plex jail and verified the uid and gid for the Plex user and group and confirmed that they are both set to '972' as expected. I also tried pointing the Plex library directly at the NewMedia dataset instead of at the Video dataset, but that had no change.

It seems like there is a permissions issue where the Plex account does not have permission to read the files within the directory, but I've followed all the steps outlined on multiple posts dealing with Plex ACLs and it doesn't seem to resolve this.

Does anyone have any suggestions on what I can do to get this corrected? If there is any further information needed, please let me know and I can add that information.

Thanks!
 

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
Did you ever solve this problem, as I am having the the same with FreeNAS 11..2-U8.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
added a 'User' ACL entry for '972' and group ACL entry for '972'. I checked the checkboxes for 'Apply Permissions Recursively' and 'Apply Permissions to Child Datasets' and clicked 'Save'.
If you're trying to give permissions to a user (which is called plex in the jail) with the ID of 972, you need to create one on the host and permit that user by name.
You shouldn't try to cheat that process by just specifying the ID in the permissions GUI (although you can do it in the CLI with chown -R 972:wheel /mnt/... or something like that.
 
Joined
Jul 20, 2014
Messages
22
I found that it didn't matter if i used the UID or created a user with that UID and used it, but what the kicker was had to do with the pools. Because of how FreeNAS treats pools as though they are independent file systems and not just nested folders. Due to that, I found that having nested pools did not agree with Plex for some reason. It couldn't traverse the folders even though it had permission to do so. So I ended up just having my pools simplified and not nested and it works fine.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Because of how FreeNAS treats pools as though they are independent file systems and not just nested folders
Nullfs mounts don't allow traversing, so that's right. You need to plan your dataset structure accordingly and mount the separate datasets into equivalent subdirectories in the jail.
 

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
Thanks, but my datasets are nested and my Music folder? is 2 rows below the main or 1st one. I only want the Music media to be seen in Plex.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
my Music folder? is 2 rows below the main or 1st one. I only want the Music media to be seen in Plex.
So if you create 2 directories in the jail, like:

/mnt/main
/mnt/music

Then

iocage fstab plexjail -a /mnt/pool1/main /mnt/main nullfs ro 0 0

iocage fstab plexjail -a /mnt/pool1/main/whatever/music /mnt/music nullfs ro 0 0
 

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
I'm getting an error when I run the 1st cmd:
Usage : iocage [OPTIONS] COMMAND [ARGS]

no such command as plexjail

The path for plex jail is:
/mnt/Back_Data/iocage/jails/plex-plexpass.

Thanks
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
You need to look at the command and the error output... what is your actual jail named? maybe plexmediaserver, plex, something else you typed when you created it (like plex-plexpass)?
 

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
The jail is called plex-plexpass in the iocage/jails folder
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
The jail is called plex-plexpass in the iocage/jails folder
so substitute plexjail with plex-plexpass and check the paths, then run the command.

Just to spell it out /mnt/pool1/main is probably not where your files are on your NAS... you need to work that part out too.
 

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
Ok my mistake.
this what I typed:
root@freenas /mnt/Backup_Data/iocage/jails # iocage plex-plexpass fstab -a /mnt/WinShare/Media/Music /mnt/main nullsf ro 0 0

That produced:
Usage : iocage [OPTIONS] COMMAND [ARGS]

no such command as plex-plexpass
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
iocage plex-plexpass fstab -a /mnt/WinShare/Media/Music /mnt/main nullsf ro 0 0
You mixed it up...
iocage fstab plex-plexpass -a /mnt/WinShare/Media/Music /mnt/music nullsf ro 0 0

I saw you didn't take the right path inside the jail, so I changed it to /mnt/music for you... so you need to ensure that /mnt/music is a directory that exists in the jail first or you'll get an error that it doesn't.
 

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
The music folder is there in plex-plexpass, and when I ran the cmd line, the right way round, it ran with error just say that the music directory already exists.
The files are not showing tho'
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
It was and still is empty
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
delete and re-create it
 
Top