Plex Jail - Sanity Check Please

Status
Not open for further replies.

Kingr_

Dabbler
Joined
Sep 3, 2013
Messages
20
Hello Freenas Forum,

I've been struggling to install plex for a couple of weeks now.

I have read most posts on this and the plex site to try and pinpoint what I am doing wrong.

At this point, I am hoping someone can see where I'm screwing up.

I WILL FIND A WAY TO BUY YOU A BEER VIA THE INTERNET IF YOU CAN HELP!!! :D

Storage setup
I have my movies on a RAIDz3 setup in a dataset called media (all subfolders eg. TV, Documentaries, etc... are in the same dataset)

that dataset and the parent dataset (Storage) all have 777 permissions as I am the only one to use the server (no internet access)

mnt/Storage/Media

Step 2: I am trying to install plex in a jail on a separate volume (a mirrored SSD)
I create the volume (called Jail) and don't change any permissions

at this point, things look like this...
index.php


From there I go to the jails tab and follow the instructions found here:
https://forums.freenas.org/index.ph...all-plex-in-a-freenas-9-10-jail.19412/page-21
1. create the jail
2. add storage
3. install plex-plexpass

everything goes smoothly until I attempt to run the command chown -R plex:plex /media
when I run it in the Freenas CLI I get: Illegal group name... is it supposed to be run in the jail CLI?

Plex also starts up but can't find the server... I'm frustrated and lost, I'm sure its something simple I'm missing

can someone point me in the right direction? I know this is likely a permissions issue but I can't figure out whats going wrong.

Thank you in advance for taking a look and any feedback you can give is greatly appreciated.

Rob
 

Attachments

  • a3bab981-948d-4f4f-a4d7-87546f336920.png
    a3bab981-948d-4f4f-a4d7-87546f336920.png
    21.3 KB · Views: 1,340

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
Basically users are the entity you assign to processes like plex and groups are what give them access.

What you need to do is to match the permissions in the jail with what you have in FreeNAS.

Given you didn’t change anything there is a system wide group called media that is present in both FreeNAS and the jails.

Plex runs under a user called “plex”, you can add that user to the group media. Then make media the owning group of the mountpoint in the jail and also the dataset and you should be fine.
 

Kingr_

Dabbler
Joined
Sep 3, 2013
Messages
20
Thanks, Garm!

I will give this a shot!
 
Joined
Apr 9, 2015
Messages
1,258
Here is the way I do the setup for plex. I create a group in the jail that matches my main SMB group number (1001) and add the plex user in the jail to that group. I also add a user to the main FreeNAS that has the same UID (972) the plex user in the jail has and make sure to also make it a member of the SMB group. Then make sure that all the data in my media folder is set to 775 so that both the group and owner have access, this allows Plex to delete something from within the application. Otherwise if you only need read access for group members you would set say 755 or 750.

It has worked very well for me and allows me to add media in via SMB and I can also delete if I want but since I have a couple of very large library's and especially the music I have was picked up here and there so that I don't even know everything I have I can hear it, decide it sucks, and then delete it from plex rather than finding it in SMB or via the command line.

Take a look at this https://www.maketecheasier.com/file-permissions-what-does-chmod-777-means/ and it will kinda explain what the numbers mean.
 

Kingr_

Dabbler
Joined
Sep 3, 2013
Messages
20
Here is the way I do the setup for plex. I create a group in the jail that matches my main SMB group number (1001) and add the plex user in the jail to that group. I also add a user to the main FreeNAS that has the same UID (972) the plex user in the jail has and make sure to also make it a member of the SMB group. Then make sure that all the data in my media folder is set to 775 so that both the group and owner have access, this allows Plex to delete something from within the application. Otherwise if you only need read access for group members you would set say 755 or 750.

It has worked very well for me and allows me to add media in via SMB and I can also delete if I want but since I have a couple of very large library's and especially the music I have was picked up here and there so that I don't even know everything I have I can hear it, decide it sucks, and then delete it from plex rather than finding it in SMB or via the command line.

Take a look at this https://www.maketecheasier.com/file-permissions-what-does-chmod-777-means/ and it will kinda explain what the numbers mean.

Thanks Nightshade00013... I'm having other issues at the moment but will give this a shot when i get my system back up and running
 

Kingr_

Dabbler
Joined
Sep 3, 2013
Messages
20
Thank you all for your help! I re-installed Freenas and was able to apply the permissions listed above. I believe the root cause I was experiencing was that plex had READ but not Write permissions.

Garm and Nightshade00013, thanks for your help. send me a message and I will find a way to get you a beer or coffee!
 
Joined
Apr 9, 2015
Messages
1,258
No problem glad to help. Not worried about a beer or coffee, I generally work for spare parts most of the time when I help people out, LOL.
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
No worries mate, when we rescue people stuck in the snow with our Land Rovers and people want to reward us for it we have a card with some charities for children with cancer :) I’ll stick to the same meta here, if you want to give me something then donate in my honor :)
 

Kingr_

Dabbler
Joined
Sep 3, 2013
Messages
20
Great Idea!!

Done! 5$ donated in each of your "names" To the Children's Hospital of Eastern Ontario
 

jwm22

Cadet
Joined
Nov 21, 2017
Messages
8
Hi there,

this sounds like the same problem I'm having. I am able to install the plex plugin and run it succesfully.
However when I try to open plex, this works, but no server is found.

I tried a lot of different options, but nothing seems so help. So I want to try the solution of nightshade.
But I'm completely new to freenas, so I have no idea how to create a user in a Jail?
And what is an SMB or UID?

probably silly questions, but I could really use some help here!
 

Kingr_

Dabbler
Joined
Sep 3, 2013
Messages
20
Hi there,

this sounds like the same problem I'm having. I am able to install the plex plugin and run it successfully.
However when I try to open plex, this works, but no server is found.

I tried a lot of different options, but nothing seems so help. So I want to try the solution of nightshade.
But I'm completely new to FreeNAS, so I have no idea how to create a user in a Jail?
And what is an SMB or UID?

probably silly questions, but I could really use some help here!

Ok, I will take the first crack at explaining this.

The reason plex searches but never finds the server is that it does not have the correct permissions to read and write data.

There is also a difference between a plugin and installing something in a jail. When reading other threads you will need to take note of which you are trying to do.

In my case, I wanted to install it in a jail. This gives me the ability to install the plex-pass version with the DVR functionality.

SMB = Server Message Block: also referred to as Samba or CIFS. The way that FreeNas "shares" the datasets with other computers on the network - http://doc.freenas.org/11/sharing.html#windows-smb-shares

UID = User Identification. http://doc.freenas.org/11/account.html#users

Essentially without getting into specific details, you are trying to get Plex (running in a jail) to have the correct permissions to access your media that is stored outside the jail.

The documentation does a really good job of explaining this: http://doc.freenas.org/11/jails.html

Getting this set up will be a great learning experience and will introduce you to lots of areas of FreeNas. it sounds silly but I had such a basic grasp of how jails, groups, permissions worked before I attempted to install Plex in a jail.
 

jwm22

Cadet
Joined
Nov 21, 2017
Messages
8
Hi Kingr_,

thanks for your reply. And you are right, I learned a lot reading the chapters in the manual.

After I did, I started over, did a fresh install. Added a share with guest acces, also intented for the media folder.
Created a jail, and added a user. Gave the user read and write permissions (in the user section) and downloaded, installed and started the plexmedia server package in the jail..

no effect.
It seems to work, the install is going well, the jails start, plex is running and can be accessed on the ip-adress.
But the Plex media server is not to be found.

Am I still doing something wrong?
 

jwm22

Cadet
Joined
Nov 21, 2017
Messages
8
And maybe it is good to know how I try to install the plexmedia server.

I'l go to the plug-ins section and select the Plex mediaserver to install.
Freenas then goes ahead, create a Jail an install the plex media server. Then I add storage to the plug-in, and disable the security.

just like in this tutorial:
https://www.youtube.com/watch?v=3DnUWTliaOY

In this tutorial, it works out fine. Why should it be me any different?
 

Kingr_

Dabbler
Joined
Sep 3, 2013
Messages
20
Hi JW,

You are attempting to install the plex plugin. Not installing plex inside a jail. I know this may seem like the same thing, but using the plugins can be a very different process.

I watched the youtube video and when I used the plugin plex I had no issues following those instructions and having them work.

I recommend watching a few different videos and take the common elements, as different versions of FreeNas and Plex can lead to several different ways of installing the same thing.

I found this video helpful: https://youtu.be/BaiBWJ2r2Hg but again I was running Freenas 11 not 9.X so there are a few small differences.

One other small thing I noticed with plex is that when selecting media the GUI that they have cant navigate to the \media folder that most videos reference. in this case, just type the address of wherever you put your media when adding storage to the plugin.

for example, this is the default place it starts looking for media
index.php


But my media is in a different folder...
index.php


So I needed to type where my media was (the plex GUI wouldn't let me navigate the folder structure)
index.php
 

Attachments

  • plex adding media.PNG
    plex adding media.PNG
    41.1 KB · Views: 1,237
  • plex adding media 2.PNG
    plex adding media 2.PNG
    21.5 KB · Views: 1,223
  • plex adding media 3.PNG
    plex adding media 3.PNG
    61.8 KB · Views: 1,203
Status
Not open for further replies.
Top