So, I have managed to install Plex on my Pi3. The server is up and running… except it can’t find the files in my USB drive (NTFS format).
The drive is automatically mounted and using the UI, I can see the files inside. However it seems that Plex can’t since when I add the library he sees the drive but doesn’t show any folder inside it.
I have checked, and the read/write rights seem to be Ok for everyone:
pi@raspberrypi:~ $ ls -ls /media/pi
total 4
4 drwxrwxrwx 1 pi pi 4096 Jul 14 14:52 Pi_Drive
I tried the following command (found in another topic about what seemed the same problem):
pi@raspberrypi:~ $ chmod 755 /media/pi
chmod: changing permissions of ‘/media/pi’: Operation not permitted
So, why can’t Plex find the folders and files inside the drive?
By default, because of the ACLs associated with it, only your user (pi) can access files under /media/pi. This is due to the way the disk is automatically mounted. The recommended way to use extra disks with Plex Media Server is to create static mount points and the necessary entries to mount them there in /etc/fstab. That method is described in @ChuckPa’s excellent Linux Tips post:
Aside from that, if you’d like something quick and dirty to try, you can modify the ACLs associated with /media/pi using the setfacl program. Something like the below should work: sudo setfacl -m u:plex:rx /media/pi
This will give user plex (the default user for PMS) read and execute permissions to /media/pi. Assuming file/directory permissions are correct for the disk mounted under that directory, Plex should now be able to read the disk’s contents.
I have to say that I feel very stupid… I had done most of what is said in that tutorial, namely I had gone as far as adding the drive to the fstab file using some other tutorial.
I just started that one from the top and it seems to be working! Plex is populating the libraries right now.
Now there just seems to be an issue (not Plex related I guess) but I can’t seem to delete anything inside that drive using the GUI…
Does Plex not give you the option to delete, or does it give you an error when you attempt to (or just not do it)? If the former, you must enable “Settings → Library → Allow media deletion.” If the latter, ensure that user plex has read and write permissions for the folder/files where the media lives.
What do you have in /etc/fstab for this drive? Are you specifying a uid/gid in the options? If not, try adding them and specifying your user’s user id and group id. For example:
Gotcha. Go ahead and add uid/gid to your mount options, specifying your user name for both. Then remount the drive and ensure ownership has been applied correctly. This will give your user full permissions to the drive; whatever file manager you’re using probably needs this to create files and directories.
Fair enough. If it becomes enough of an annoyance, you may want to check around the Raspberry Pi forums to see if it’s something someone over there has run into. It’s almost certainly something to do with ownership/permissions. My Pi isn’t free for testing right now, so I can’t offer any other concrete suggestions.