Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

SOLVED Plex doesn't find media files on mountpoint I configure as library

Western Digital Drives - The Preferred Drives of FreeNAS and TrueNAS CORE
Joined
Jul 13, 2013
Messages
236
FreeNAS 11.3 u4.1, plex plugin either 1.20.1.3252 or 11.3-release-p13 (one of those is probably the plugin version, the other probably the plex version, but it's not at all clear which in the plugin display in the freenas gui). (i.e. all current for Monday 9/14)

My music is on the pool of the freenas server. I've mounted that filesystem in the jail for the plugin (configured a mountpoint for the plugin), and when I use the shell function to log in directly to the plugin jail, I can see and read the music files right where I told them to be. And, when I tell plex to add folders to the library, I can browse to the directories (they appear there at /media/zpdb/music, which is what I'd expect).

But when it scans for files it never finds anything, and when I go back to manage the library it doesn't seem to show the folder I added.

Any ideas? This ought to be *just so simple* (or at least the hard part should be realizing I had to configure the mountpoint and getting that done; but that just worked).
 

Basil Hendroff

Neophyte Sage
Joined
Jan 4, 2014
Messages
1,219
Does user Plex (UID/GID 972) have read access to the music files outside the jail?
 
Joined
Jul 13, 2013
Messages
236
Outside the jail? On the FreeNAS system itself there is no user PLEX or UID 972.

Inside the jail, I can see and access the files on the mountpoint from a shell session.

Hmmm; the shell session I get (from the jails page, the menu at the right side of the line for the plex jail) runs as root. Root has access to the files, but the protection, group, and ownership says that user plex/972 would not. And ps does seem to say that the plex software is running as user plex in the jail.

So that's probably the problem.

Um, how can it be fixed? If I create a user PLEX back on the main FreeNAS level (what's the write term for that? The OS that is hosting the jail, anyway) and assign ownership to that user, that will break everything currently accessing the files. ACL, with inherited permissions, to add 972 without changing anything? But every time I touch ACLs I get badly mauled; they're insanely complicated and don't seem to work in usual day-to-day operation (new stuff created under old stuff I can access frequently can't be accessed for example). Will creating a user 972 on the host OS ever cause trouble, that seems to be in a reserved UID range? Can I do something different in the mountpoint config instead? (Oh; will ACLs even work, I think I may have them turned off in samba sharing that stuff, since they always mess me up anyway.)

For this one exact case, the music, I can just make it world read (PLEX won't be allowed to write it; I don't trust these big greedy servers, having had a series of horrible disasters with iTunes a decade or so ago). So that can be a solution to the immediate problem, but not necessarily to other problems that will come up as I add other media.
 

Basil Hendroff

Neophyte Sage
Joined
Jan 4, 2014
Messages
1,219
That'll be the issue. In order to generate the metadata, Plex needs at least read access to the music files outside the jail. An excellent reference is this thread [How-To] Giving Plugins Write Permissions to Your Data.

I'm not able to hand-hold you through setting up the ACL for your music (every use case is different), but you want to aim for something along the following lines...

screenshot.570.png
 
Joined
Jul 13, 2013
Messages
236
Seem to be having some luck with the "group write" scenario from that post you linked, adapted to just be group read -- the music files are already in group music/1007, so I created a group 1007 in the jail and assigned the plex user to have that group. I then restarted the plugin (I think the running plex processes needed to be restarted to have access to the new group; but I didn't try before I restarted so I'm not positive).

And Plex is now processing my music files, so I'm going to call that successful resolution of this problem. Thank you!
 
Joined
Jul 13, 2013
Messages
236
I'm not able to hand-hold you through setting up the ACL for your music (every use case is different), but you want to aim for something along the following lines...
I was looking at using the FreeNAS GUI to change permissions on the filesystem, but same idea, grant access to an additional user, traversal and read. Ended up going with the group access in the jail because that limits the hackery to the inside of the jail, which feels more contained and safer to me. But thanks for this pointer also!
 

rvassar

Senior Member
Joined
May 2, 2018
Messages
530
I hadn't really looked into this... Dropped some Music in my Plex folder over a year ago... It never indexed it... Been too busy to even think about it, let alone troubleshoot.

Fixed the permissions... SMH!

Thank you @David Dyer-Bennet!
 
Top