Ubuntu 16.04 --> FreeNAS Jail Migration -- Help!



I'm having nothing but problems with trying to migrate my Plex server to my FreeNAS box. I'm following all of the instructions here and am able to see the server initially. But after I "sign-out" and move the Plex Media Server\ Directory (tar'd) to the FreeNAS system something goes wrong. After extracting the content to the Plex Media Server\ Directory on the FreeNAS jail and start the services i get a "connection refused" error when trying to connect to it.

I'm moving EVERYTHING in the Plex Media Server folder from my ubuntu install, that includes plugins, etc. Has anyone experienced this before? Can I get some help?!


First to check will be the permissions. What’s the UID of the user running Plex within the jail? Make sure the UID of the extracted directory and its contents are the same. If not, you’ll need to run a chown -R UID "Plex Media Server" to correct it. After that, check the logs within this directory as they will usually indicate what the problem is. Obviously it can’t log if the permissions are wrong so that’s why I brought that up separately.


Great suggestion, trying to do that now. Looks like there is a “plex” group listed now. Here is the listing on the /etc/group file:

plex : * : 972

So I assume that means it’s UID is 972. I’m running a chown on that directory…will probably take some time as there are over 1.4 million files in there. Is there a good guide to managing plex in a jail on FreeNAS? Tried to follow a guide but it didn’t mention permissions at all.


That fixed it! Any other issues I will run into due to permissions?

Edit: Looks like i’m not able to browse most of the directories in my library…


Not being able to brows directories could be permissions as well. If you change users to the plex user see if you can browse the directories on the command line. (I don’t use jails anymore but IIRC you can do a sudo -u plex -i inside the jail to get a shell as the plex user.


Your other option is to change the UID and Group of the Plex user. Uhm - pw usermod -n plex -g (whatever your files are at) if they are at anything but root of course

Sent from my iPhone


Note that if you do change the UID of the plex user, you’ll have to do the chown on the “Plex Media Server” directory again.


Seems that all of my problems are directly related to permissions. I guess i’ll have to form a plan on how I want to do this.

Since I have been using an “out-dated” form of my original Plex Media Server directory from my current server, do you have suggestions on how I would ONLY move new files from my current server to my new FreeNAS jail?

Also, any suggestions on how to setup the plex user to have full permissions on newly written data? For now i’ve kind of just given full access to everything, but that doesn’t seem to be a good route moving forward.


I’m going to create some type of step-by-step guide on how to do this since most guides out there don’t mention ANYTHING about these permission issues that might crop up.


There are a few ways to do permissions. One is to add the plex user to a group and assign the media to that group. Then you grant that group read (and on dirs, execute) permission.

Another way that’s much more complex but requires no maintenance once done, is to use ACLs. I have these ACL on all my media directories where I had created a plex user outside the jail with the same UID:


And this on each file:


After doing this, every new file, regardless of umask, group settings, etc, gets the ACL entry that grants the plex user read permissions. If you want to spend the time learning ACLs, it could save you some pain in the long run.


Guess i’ll have to get familiar with how to do ACLs on FreeNAS. I’ve purposely steered clear of permissions stuff with FreeNAS but now that I have to learn it…guess it’s time. Thanks for the help. I’ll be searching for those guides and how-to’s now =)


Hi all, sorry to bring this thread back from the dead.

I got all of my permissions squared away, but now I’m having issues with actually playing back the files. No permission issues in the log, it says it’s playing properly via the webGUI but ALL of my clients, local and remote, are just showing the buffering sign and never playing anything back. Any ideas?!


Does anyone have any idea what might be causing this? ^^^