Cannot access media Plex iocage jail

SW77

Dabbler
Joined
Apr 1, 2017
Messages
16
I set up plex in an iocage jail using the following.

Code:
echo '{"pkgs":["multimedia/plexmediaserver","ca_root_nss"]}' > /tmp/pkgs.json
iocage create -r 11.1-RELEASE -p /tmp/pkgs.json -n PLEX ip4_addr="vnet0|192.168.74.2/24" defaultrouter=192.168.74.1 vnet=on boot=on allow_raw_sockets=1
iocage exec plex sysrc plexmediaserver_plexpass_enable=YES
iocage exec plex service plexmediaserver_plexpass start
iocage fstab -a plex "/mnt/ZFS/Media/Movies /media/movies nullfs rw 0 0"


I can access plex fine but when I go to add my movies plex can not see them.
Any help is appreciated.
 
Last edited:

SW77

Dabbler
Joined
Apr 1, 2017
Messages
16
That's what I figured but I'm not sure what I did wrong or where to change it
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,555
The user used to run plex need to be member of the group owning the media. And the GID need to match in the jail and FreeNAS
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
Also note that you have to manually enter the path in the plex settings (GUI), it won't show up in the GUI no matter what you do.
 

SW77

Dabbler
Joined
Apr 1, 2017
Messages
16
The user used to run plex need to be member of the group owning the media. And the GID need to match in the jail and FreeNAS
I've been trying to figure this out for hours. I'm lost, can you explain how to do this? Thanks I'm using 11.2 BETA if that makes a difference.
I had this working with my old warden jail.
 

SW77

Dabbler
Joined
Apr 1, 2017
Messages
16
Also note that you have to manually enter the path in the plex settings (GUI), it won't show up in the GUI no matter what you do.
I knew that, Thank you. Here is the path I entered in to Plex "/mnt/iocage/jails/PLEX/root/media/movies"
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,555
I knew that, Thank you. Here is the path I entered in to Plex "/mnt/iocage/jails/PLEX/root/media/movies"
The jail has its own root. It won’t see the FreeNAS root. So based on your statement the path should probably be /media/movies
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,555
I've been trying to figure this out for hours. I'm lost, can you explain how to do this? Thanks I'm using 11.2 BETA if that makes a difference.
I had this working with my old warden jail.
Assign an appropriate owner and group for the folder you share with the jail. Then create the same group with the same GID in the jail (unless you used one already existing in both, donno the state of things sins they moved to iocage) and make the user running plex member of that group. The user running a service is defined in the rc.d script.

And ya, make sure the group has the appropriate rights in FreeNAS.
 

SW77

Dabbler
Joined
Apr 1, 2017
Messages
16
So everything is working now. The fix was the path name, in my case /media/Movies. I didn't have to set any permissions. Once I got Plex installed in the jail, I went in to the Plex jail via the GUI and added the mount points as needed. In 11.2 Beta1 the only other option you have when adding mount points is to make it read only.

Thanks again for your help, that was frustrating

FYI for anyone else. The jail can be setup in the GUI, Plex will then be installed in the shell.
 

ledieu

Dabbler
Joined
Oct 15, 2016
Messages
40
Assign an appropriate owner and group for the folder you share with the jail. Then create the same group with the same GID in the jail (unless you used one already existing in both, donno the state of things sins they moved to iocage) and make the user running plex member of that group. The user running a service is defined in the rc.d script.

so say i have a user with the id 1001 and a group with 1001 that have acces to the media. how do I creat the user and group in the jail? and where do i find the rc.d script?
 

SW77

Dabbler
Joined
Apr 1, 2017
Messages
16
so say i have a user with the id 1001 and a group with 1001 that have acces to the media. how do I creat the user and group in the jail? and where do i find the rc.d script?
When I created the jail and set the mount points the only option for the mount points was to make them read only. There was not an option for setting permissions in the GUI.
I went to the jail shell and used these commands to install Plex

Code:
 pkg update && pkg upgrade 

pkg install multimedia/plexmediaserver 
 

jg3

Dabbler
Joined
May 17, 2017
Messages
20
Did the media user disappear?
media:*:8675309:8675309:Media User:/var/empty:/usr/sbin/nologin
This user has existed in the FreeNAS 9x versions I used, and is there on my base system running 11.1 ... But when I moved my warden Transmission jail to iocage a week or so ago, I hit the "upgrade" button in the UI and now it reports 11.2-RELEASE-p9 and there's no media user or group. This is causing a couple of problems, including permissions issues similar to what started this old thread.

Thoughts? Did I just miss something?
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,555
I’m not sure why a user would disappear due to an upgrade, but the FreeNAS users aren’t shared with jails. You need to set up users manually (or connect to a directory) to get the users in the jail
 

jg3

Dabbler
Joined
May 17, 2017
Messages
20
What I'm saying is there was a default user entry for "media" in previous versions that seems to have gone away. I could certainly create the user/group with the same UID & GID on each jail that needs it. But it was very convenient that it existed by default the same way user entries for games, news, man, sshd, bind, proxy, uucp, www, nobody ... and so on already exist.
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,555
Donno what the new template looks like, but working from CLI you can set up your own
 
Top