Raspberry Pi 3 Plex Server can't find the files in USB drive

Hello,

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?

Thanks for any help anyone can provide!

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.

2 Likes

Thanks for the reply!

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…

Thanks again!

1 Like

No problem, happy to help.

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.

Its Linux that says it cant find or create a trash directory for the disk. I haven’t tried to do it using Plex truth be told.

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:

UUID=1234567890ABCDEFG   /mnt/ntfs       ntfs    nosuid,nodev,nofail,x-gvfs-show,uid=someuser,gid=someuser       0 0

This will mount the drive as being owned by your user/group. It won’t change the permissions you set earlier, just the owner.

I have:
UUID= xxxxx /disks/Pi_Drive ntfs defaults,auto,users,rw,nofail,noatime 0 1

Should I just take the section you have after ntfs?

I’d just add “,uid=someuser,gid=someuser” to the options you already have and remount the drive.

After doing so, do an ls -l /disks/Pi_Drive to see what user and group it reports; you could also run this command before to see what it is currently.

I currently have root as the user and group if not mistaken.

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.

Did that, but still cant delete stuff from the USB drive. It says that its unable to find or create trash directory.

Of little consequence… I am still “king” of my folders with Windows xD

1 Like

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.

1 Like

Thank you anyway for the help!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.