How To Install Plex in a FreeNAS 11.2 Jail:
.... snip ...
Accessing Mounted Storage In Your Jail With Plex:
- Follow the documentation to add additional storage in your jail
- Since Plex doesn't need to make modifications to your data, it's best to make the mount read-only as an additional protection
- After mounting the storage in your jail, it may be tempting to grant your files 777 access to give Plex access to them. Don’t do it though! There is an easy work around by creating groups in the jail with the same GroupID as the ones on the host system, and then adding the "plex" user to that group.
- To find out what the GroupID is of the group that is assigned permissions on the mount, run the following command in the jail (assuming you mounted the storage in /mnt in the jail):
ls -l /mnt
- You’ll then see a list of mount points such as this one:
Code:
drwxrwx---+ 7 1002 1001 8 Mar 3 18:35 Media
... snip ...
I'm still having trouble.
First, I followed the instructions in the 11.2-U6 UG 14.3.3 and added a mount point w/ Source of /mnt/Volume1/Media and Destination of /mnt/iocage/jails/plex/root/mnt. But in the jail, instead of seeing "Media" in the jail's /mnt (as in the example), I see the directories underneath it: Movies, Music, and TV Shows. Also, I thought I had set this up to inherit users & groups, but initially everything belonged to root in group "wheel."
Then I realized the two mount points must be similar. So I deleted the first mount point and created one with Source = /mnt/Volume1 and Destination = /mnt/iocage/jails/plex/root/mnt. This was a little better in that I could now see the Media folder. But although in the FreeNAS shell
ls -l /mnt/Volume1
gives:
Code:
drwxrwx---+ 5 media media 7 Oct 23 20:18 Media
in the jail's shell
ls -l /mnt
looks like:
Code:
drwxrwx---+ 2 root wheel 3 Oct 22 20:43 Media
(I'm suspicious of the timestamp being earlier in the jail than in FreeNAS; the mount point was added after any changes to the dataset.
I thought it would be easy to make the changes with
chown media /mnt/*
and
chgrp media *
, but I guess not. In my first attempt I had botched things up, so I used vi to edit /etc/passwd & /etc/group. Now
cat /etc/group | grep media
yields
Code:
media:*:8675309:plex
which is what I want (I think).
Nonetheless, in the jail issuing
ls -l /mnt
does not change anything; the result is just as before: Media's owner and group remain root and wheel.
To make matters worse, in the FreeNAS shell issuing
ls -l /mnt/Volume1/Media
yields:
Code:
-rwxrwx---+ 1 media media 10244 Oct 25 00:52 .DS_Store
-rwxrwx---+ 1 media media 0 Oct 24 16:01 .windows
drwxrwx---+ 2 media media 3 Oct 23 17:57 Movies
drwxrwx---+ 5 media media 7 Oct 24 15:48 Music
drwxrwx---+ 2 media media 3 Oct 23 18:00 TV Shows
but in the jail
ls -l /mnt/Media
only yields:
Code:
total 1-rwxrwx---+ 1 root wheel 0 Oct 22 20:43 .windows
I suspect this has something to do with root & wheel being Media's owner & group, but plex's are plex & media respectively. Plex therefore lacks permission to look inside Media. If this is correct, then fixing the owner & group issue might solve the problem.
But I've spent the past day & 1/2 on this and have a train to catch tomorrow. I'm hoping to fix this before I leave. Hence, this post asking for your sage advice.