Plex Iocage Jail Permissions

Guinea

Explorer
Joined
Aug 1, 2017
Messages
84
I am tired of messing with permissions on this system. I migrated an old Plex jail over to iocage and all of the permissions came with it. The DVR function was having issues saving the recordings to the directories, so I did a chown -R root:plex media/ directory to get the permissions correct based on some blogs/instructions I was reading. Now I broke my ability to drag and drop files from my HTPC to the Plex directories via the windows SMB. It doesn't tell me what user is not allowed, it just says the permissions are not right. I have the network drive saved and it works fine, but if I try to move a file over to that location, it fails.

When I originally setup FreeNAS, I set up some random users and groups because I thought it would make more sense to create custom users and groups for the functions. Instead, now I have a mess of users and groups and I don't understand what is failing because I don't even see anything in the logs. No access denied or unauthorized user warnings or anything. At this point I just want my security to be removed....I want free-for-all access between my HTPC and my FreeNAS server. A single user name across the board. I was trying to use root for everything to make it simple to manage but the warnings FreeNAS gives me when I try to access things are vague and tell me nothing. I am looking for recommendations or suggestions on how to fix this mess. Even something as simple as where to read this data in the logs to determine what the heck is even happening when I try and drop a file in the folder.
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
I know it can be frustrating to be banging your head against a wall with permission issues. We have all been there.

I would highly recommend saving your Plex database, blowing away the plex jail and recreating it from scratch. Then create a new dataset for your media and load it there. The short of it is you need the dataset on the FreeNAS to be owned by a user and group that have read and write access. Then the create a group in your plex jail with the same GID as the one on the host side.

What guides have you followed? I know all the information is out there that will get you where you want to be, it can just take some patience and time. And I totally understand your frustration, and so if it were me, I would step away from the project for a day or so until you can come back to it with a clear head and the patience to do it correct this time.
 

Guinea

Explorer
Joined
Aug 1, 2017
Messages
84
I know it can be frustrating to be banging your head against a wall with permission issues. We have all been there.

I would highly recommend saving your Plex database, blowing away the plex jail and recreating it from scratch. Then create a new dataset for your media and load it there. The short of it is you need the dataset on the FreeNAS to be owned by a user and group that have read and write access. Then the create a group in your plex jail with the same GID as the one on the host side.

What guides have you followed? I know all the information is out there that will get you where you want to be, it can just take some patience and time. And I totally understand your frustration, and so if it were me, I would step away from the project for a day or so until you can come back to it with a clear head and the patience to do it correct this time.

Thanks. I was afraid that was going to be the suggestion. I don't disagree, I was just hoping for something a bit less invasive. I think I would be more willing to start from scratch if there was a clear cut instruction manual on how to do it. I get nervous when I have to start piecing together blogs and instructions from one person to another and the steps are not clearly linked together. Some people use the UI and some people use strictly command line. I am fine with either, but I just want to be safe when I do it. I have been ripping movies from my collection for over a year now and I really don't want to throw away all that work. I was just hoping there was something easier to do like a chown -R plex:plex, create a plex user, plex group and make them the proper UIDs and be done with it all. The real problem I have right now is just that my windows PC, which has the network drive saved to that plex filesystem so I can drag and drop the movies I am ripping there, is not letting me do anything from a permissions standpoint. It just doesn't tell me what user it is trying to log in as or what permissions are failing....so I don't even know what to fix.
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
I understand. This is the guide I followed:
https://www.ixsystems.com/community...darr-lidarr-jackett-transmission-organizr.58/

If you run into a problem with that guide, post back here and I can try and help with specific errors.

EDIT: and as far as losing your ripped movies and such. You shouldn't have to destroy your main pool. What I would do is create a new dataset and move your media to hat. Then change the permissions to have the owner set to the user you use to login into the share with, and the group by something called "media". They create your iocage jail and inside the jail create the group "media" and set its GID to the same as the GID of the group "media" on the FreeNAS side. Then set your mount points as outlined in the guide.

No reason to delete all your media.
 

Guinea

Explorer
Joined
Aug 1, 2017
Messages
84
This issue ended up resolving itself. I don't know what happened or what changed, but I went back in last night and tried to move another file so I could get a look at the error again and it moved just fine. Really strange behavior considering nothing changed (except maybe a cron job that runs every night to update Plex using the PMS_Updater.sh script function). Either way, I still like your idea and will keep this data. This upgrade will still be needed in the future if I want this to be more maintainable, so I will put this on my to-do list. Thanks again!
 

WookieCookie

Dabbler
Joined
Nov 22, 2017
Messages
13
This might not help directly with the issue you have at the moment, but might help with mitigating permission issues with plex later on.

Permission issues with Plex can be a bit of a pain. I ended up adding a plex user with the uid of 972 and group plex with gid of 972 to FreeNAS, powering the jail down, SSH into the FreeNAS box and run
Code:
sudo chown -R plex:plex /mnt/poolname/datasetPlexIsUsing

or drill down into which ever directory/file is giving you an issue. I keep my transcodes and TV that is recorded over the air in separate datasets outside of the jail and have had to change the permissions on those datasets to allow the jail to add/remove/execute what is stored within them.
 
Top