File Permissions - Plex/TrueNAS

T4LLGUY

Dabbler
Joined
Jul 17, 2022
Messages
12
With my HP G7 N54L now working (horrah!) I've installed TrueNAS Core and added the Plex 'plugin'.
is
My data will be stored in /mnt/MyData/Storage/ and will have these subdirectories Films, TV-Shows, Photos. The current owner of these directories is set to 'nobody' as I'd hoped this would of not complicated anything in terms of permissions.

The owner of /mnt/MyData is root

The problem that I'm having is that I've moved some data across but Plex cannot see the files/directory to update with media content. I'm assuming this is a permissions issue?

I'm guessing that I need to do something like this:

https://askubuntu.com/questions/150909/plex-wont-enter-my-home-directory-or-other-partitions

But I'm a Linux noob and wanted to double check with you guys first please as I wouldn't want to do anything wrong (which would take me longer to fix if I didn't ask first!)

Thank-you in advance
 

T4LLGUY

Dabbler
Joined
Jul 17, 2022
Messages
12
or is it simply the case (less secure) of just chmod'ing the MyData folder with recursive 777 permissions?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
or is it simply the case (less secure) of just chmod'ing the MyData folder with recursive 777 permissions?
That may temporarily work (until an application has a umask that changes the permissions).

1) Create a dataset for MyData/Storage
2) Create any desired child datasets of MyData/Storage
3) Create a local user "plex" with user ID (972) (IIRC this is plex's UID, you can double-check) *note this isn't required, but eases management
4) recursively set ACL (with traverse checked) on MyData/Storage with the following entries:
owner@ - FULL_CONTROL
group@ - FULL_CONTROL
GROUP:builtin_users - FULL_CONTROL
USER:plex - READ

All should be set to INHERIT

This will allow the plex process running in the jail always be able to read any data written to the server (via plex entry), and all local users to read / write data on server (builtin_users).
 

T4LLGUY

Dabbler
Joined
Jul 17, 2022
Messages
12
Thank-you very much Anodos, I'll try this shortly and revert, just struggling to get the house tinternet back up again as I'm now attempting to pass through NowTV's router into my Asus router. Problem faced here is NowTV doesn't have bridge mode and I think the Asus router stopped working correctly! Leaving me only mobile for now!! Thanks again, I'll revert ASAP!
 

T4LLGUY

Dabbler
Joined
Jul 17, 2022
Messages
12
OK.. so yes the Asus is a bit more of a problem, in the end I just settled for using it as an AP. Getting back to the Plex/TrueNAS.. I think I've done as asked (but I'm a bit noob) and either I've done it wrong or it hasn't worked.. Afterwards I even restarted Plex, but still no good.. I tried deleting that newly created Dataset and using the 'Permissions' directly for the 'Storage - Default storage entry' again still no go?

Screenshots available here:
https://i.postimg.cc/vBP8PGDh/ss0.jpg
https://i.postimg.cc/PfRrYfgr/ss1.jpg
https://i.postimg.cc/qqSJTQsC/ss2.jpg
https://i.postimg.cc/2yVkMgZD/ss3.jpg
 

T4LLGUY

Dabbler
Joined
Jul 17, 2022
Messages
12
OK, so obviously (after several hours of searching other threads) this is a fairly common issue.. really need some one with expertise!!

Running the jail shell (and not knowing much about linux) I typed 'whoami' which gave me 'root'. Which is correct I guess, but what I don't understand is, once I created the user 'plex' how that user gets associated to Plex related tasks? Is it purely on the guid?

In my head the plex jail shell should be running as 'plex' user? and if it's not (which it is't) when root user itself attempts to access the /mnt/MyData/Storage/ it see's no directories further than /mnt ??

I'm here, i'm attempting to sort this out today and I'd really appreciate your help please!

https://i.postimg.cc/qvfsgFW7/Pools.jpg
https://i.postimg.cc/XNzc6q8d/Permissions.jpg
https://i.postimg.cc/NMCWqXbZ/Plex.jpg
https://i.postimg.cc/V6443cs6/Jail-Shell.jpg
https://i.postimg.cc/J4hzXwsQ/Ownership.jpg

Ultimately, I was told "All should be set to INHERIT" which you can see isn't the case but I'm almost certain that I set that originally, now looking back into it to edit it, which boxes should be set to 'inherit' (all of them??)

https://i.postimg.cc/zX1XdL20/Inherit.jpg

Apologies for my noobness.. I'll await a reply, I really don't want to mess this up any further! Thank-you in advance.

https://i.postimg.cc/9FHJ8DgQ/Owners.jpg

EDIT : As a final thought I've 'ls -l'ed the directory from the general shell.. Maybe this is the issue? using 'nobody' - I don't really know, I'm only guessing and don't want to make any further changes until instructed please (x100)
 
Last edited:

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
I seem to recall that in /etc/passwd you should be able to confirm that the uid for the plex user is 972
Check that first
Then create that user in TN Core and give it access to all the media data
Then in jails, create a mount point to the media data.

But first confirm the 972
 

T4LLGUY

Dabbler
Joined
Jul 17, 2022
Messages
12
I seem to recall that in /etc/passwd you should be able to confirm that the uid for the plex user is 972
Check that first
Then create that user in TN Core and give it access to all the media data
Then in jails, create a mount point to the media data.

But first confirm the 972
Thank-you and my apologies for taking so long to get back to this thread.

As an update, I've been rewiring my father's loft for hard-wired network connectons and all sorts of other associated fun.

However, now I'm back to the Plex task in hand.. I've reinstalled TureNAS and learned a thing or two during that process, namely that by creating a 'Dataset' I don't physically create the directories myself. Noob I am, yes and, no doubt making things harder for myself from the start!

Then as you've rightly mentioned @NugentS "Creating a mount point" which I had never done before.. again my noob apologies.

So I'm starting to get there but not quite there yet..

https://i.postimg.cc/nhRMshbc/Plex-Jail-Shell-Sees-No-Files.jpg
https://i.postimg.cc/sxr2FBSK/True-NASShell-Sees-All.jpg
https://i.postimg.cc/YSv0QBMN/Storage-Pools.jpg
https://i.postimg.cc/jjB5X3Sp/Storage-Folder-Permissions.jpg
https://i.postimg.cc/gJR0Bywn/Plugin-Mount-Points.jpg
https://i.postimg.cc/Wb7dv75Z/Photos-Is-Empty.jpg

I'll attach several screenshots of where exactly I'm at now.. Obviously, my father (eric) needs to be able to upload data to the storage volumes with full access permissions (hence the user eric was created) and plex user needs to also read those files. However, what I'm not sure about is what the actual owner should be once they've been uploaded (root?) so in the mean time I've been running this command:

chown -R root /mnt/EricsWorld/storage/

Nearly there, just maybe a mount point issue or more likely a permission/ownership issue.

Really appreciate you help and guidance please, thank-you in advance..
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
Normally (in my limited experience) the Plex container can see the files as its user, but the users of the NAS can't.
Have you confirmed the user that plex is running under?
 

T4LLGUY

Dabbler
Joined
Jul 17, 2022
Messages
12
Sorry, you had already asked me that before and I forgot to answer you. Yes plex 'user' is set to 972, eric 'user' is set to 1000 and 'eric' is a member of the 'plex' group as well..

https://i.postimg.cc/rwh0FRHp/uids.jpg

I'm using 'ls -l' in the root shell and trying to figure out what the file permissions are supposed to be to show up in the plex jail shell, then I presume the media files will magically start appearing?

https://i.postimg.cc/GmSpkJKW/Experiment.jpg
https://i.postimg.cc/QxmCMrTx/Exp2.jpg
https://i.postimg.cc/CxK1B6GC/Exp3.jpg

EDIT.. Or not.. o_O

https://i.postimg.cc/PfgVqPDT/New1.jpg

I'm really struggling to get my head around all this.. so does that mean it's not an ownership/group issue? :eek: My brain is fried..
 
Last edited:
Top