Ubuntu – Plex Media Server: Won’t find media External Hard Drive

external-hddhard drivemediaserverplex

I am attempting to turn an older PC into a home media server with Ubuntu 12.04 using Plex Media Server. I have a newer WD 2 TB external USB HD with all of my media on it.

I can not for the life of me figure out why Plex will not recognize the files on this hard drive. It shows the external as there, Ubuntu shows the files and allows me to play them, view them, etc. Plex shows the name "External".

But when I click it, it is 100% empty and shows nothing to add. I can access the files on the external through file sharing just fine, on my windows computers but would love to be able to use Plex for streaming with our Roku.

I am fairly new to Ubuntu, I have used Plex with the same HD on Windows and it worked fine. I have read multiple articles on this and nothing seems to be doing the trick.

How can I solve this?

Best Answer

You have to make sure that the user plex has access not only to the drive, but the folder that the drive is mounted in. After a lot of tinkering I wound up going this route:

Edit the Mount Options (Disks -> "More Actions" (the two gears under the "Volumes" map) -> Edit Mount Options) such that:

nosuid,nodev,nofail

is in the area for storing the options in the /etc/fstab file (the textbox under "Symbolic Icon Name")

and set the Mount Point to be:

/media/<user>/<HDD Name>

and remount your HDD so that it will appear in the specified location.


Next, add yourself to the plex user group by going to the Terminal and enter:

sudo adduser "$USER" plex

Now, you can modify the ownership of the relevant files and directory so that they are owned by ${USER}:plex. You can give plex read-access to the drive by going to the Terminal and enter:

sudo chgrp plex "/media/${USER}/"
sudo chmod g+rX "/media/${USER}/"

sudo chgrp plex "/media/${USER}"/<HDD Name>/
sudo chmod g+rX "/media/${USER}"/<HDD Name>/

It may also be necessary to ensure that ACL permissions are properly configured, so the following might also be necessary:

sudo setfacl -m g:plex:rx /media/<user>/

FYI: If a file/directory displays a + symbol as part of its permissions (e.g. drwxr-xr-x+) that means that ACL controls are active for that file/directory.


Now that Plex has access to the drive, you need to make sure that it has access to all files in the relevant directories. This can be done by repeating the following for all of your media library folders:

chmod -R g+rX /media/<user>/<HDD Name>/<Library Folder>

This solved my issues for the two extra drives I've added to my HTPC. Hope it helps.

PS: As @douggro mentioned, Plex has a good article on the subject, but they changed up the structure of their site, so it took me a while to find it from his link, so here's a more current link to the page: Plex Linux Permissions Guide

Related Question