26

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?

  • Are you still facing this issue? – Braiam Feb 13 '14 at 1:50
  • @Braiam seen Dec 25 '13 at 11:24 – janot Mar 4 '15 at 1:28

15 Answers 15

23

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, give all users on the computer read access to the drive by going to the Terminal and enter:

sudo chmod go+rx /media/<user>/
sudo chmod go+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:

sudo chmod -R +rwX /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

  • 2
    This is the only solution that worked, it's only 3rd right now. Thanks ! – stallingOne Sep 19 '16 at 19:22
  • I do not understand the second step "and set the mount point to be". What mount point? – ScottF Oct 1 '17 at 2:27
  • @ScottF The mount point that you want to assign to the drive. – SamWN Oct 1 '17 at 14:59
  • Thanx @SamWN, this solved my issues as well. – Fred Jun 17 '18 at 15:27
  • This is a rather silly thing to do, and borderline dangerous. If you ever do a chmod -R 777, it reads as "I don't know what is wrong, but it's definitely to do with permissions, so how about I allow everything", and that is a dangerous approach. At best, all you should need to do is sudo chmod 0755 /media/<user> /media/<user>/<HDD Name>. Your suggestion would modify EVERY file in the ENTIRE disk marking all as (among other things) executables. Not surprisingly, nowhere in the guide you linked to does it suggest to do something so brazen. Edit submitted for review. – swalog Aug 16 '18 at 10:13
21

As several people have mentioned, the issue is likely due to the plex user not having the correct permissions. I had a similar problem, and was able to fix it using a few easy steps.

Open this config file:

sudo nano /etc/default/plexmediaserver

Find this line:

PLEX_MEDIA_SERVER_USER = plex

Replace plex with your username, and save the file. Once I restarted my computer, Plex was able to access the folders on the external drive.

You may be able to run sudo mount -a and/or sudo service plexmediaserver restart instead of rebooting.

Credit: htpcguides.com

  • Can confirm that the additional commands at the end work in place of a reboot. – Cora Feb 10 '16 at 0:43
  • 3
    I wouldn't recommend this approach because it gives plex access to all the files as your regular user - something that's good to avoid if possible. SamWN + janot's answers work for restricting the plex user's access to only the media in question. – Kevin Qi Apr 16 '16 at 4:42
  • This solution did not work for me – stallingOne Sep 19 '16 at 19:13
  • @KevinQi I agree with you. How else can I do it? I cannot chmod the External Hard Drive it is connecting to because it is owned by windows. – Kolob Canyon Dec 30 '16 at 21:09
11

I don't know what's going on, but the only thing that helped me with ext4 drive was setting in "Disks" app "Automatic Mount Options" - "OFF" and setting "Mount Point" "/mnt/foobar" instead of "/media/username/foobar".

  • Mine was actually in /mnt instead of media and when I changed it to /media it worked. – marcogmonteiro Apr 6 at 22:07
5

Try adding Plex to the plugdev group.

Open a terminal (Press ControlAltT) and enter

sudo gpasswd -a plex plugdev

Verify that plex was added to the plugdev group by entering:

groups plex

which should display what groups plex belongs too. Next, reboot the computer and start plex to verify this corrected the problem.

5

It's the folder mount point of your extern hdd that's giving trouble.

It hasn't got the right rights, the easiest way to change this without terminal commands except opening nautilus as root goes as follows:

open nautilus with sudo:

sudo nautilus (or any other system browser opened with root)

hover over your extern hd with the mouse arrow to see the full path of your hd, or click on it and then press Ctrl+l to see the full path in the adress bar.

example: /media/nick/extern_hdd1

extern_hdd1 is mounted to the folder nick, go to media to change the permissions of the folder nick, to do this press ctrl+l and paste /media/ in the address bar or browse to media manually.

right click on the folder nick go to properties and change the following:

Owner : nick (in your own case your own user name) Folder access : Create and delete files File Access : ---

Group : plugdev Folder Access : Access files File Access : ---

Others Folder Access : Access files File Access : ---

That's it!

4

You need to configure fstab to set the proper permissions.

There is a whole page about how to do this on the Plex site, see: https://support.plex.tv/hc/en-us/articles/200288606-Mounting-NTFS-Drives-on-Linux

To make it short:

  • Find the UUID of your drive:

    sudo blkid | grep ntfs

  • create a directory where you will mount the drive:

    sudo mkdir /media/ext_NTFS_USB_Drive

  • edit file /etc/fstab with command:

    gksu gedit /etc/fstab

  • add a line to this file and save.

    UUID=485CBF485CBF3014 /media/ext_NTFS_USB_Drive ntfs-3g permissions,auto 0 0

    where the UUID is the one your drive and the mount point is the folder you created.

  • now mount the drive:

    sudo mount /media/ext_NTFS_USB_Drive

    (you might get an error saying the drive is already mounted, in Nautilus for example. Just unmount it - Safely Remove Drive, or click the Eject Icon in Nautilus)

Now in Plex, you need to change the location of the media folder you were trying to add to somewhere inside: /media/ext_NTFS_USB_Drive

2

It is most likely a permissions issue with Plex. Read this page for info on Plex permissions. Also consider creating a folder on the external dedicated to your media then creating a mount point for it in your fstab entries, mounting it as the user plex.

1

The chmod worked for me and I am using a vfat and an ntfs drive both and they both work great now, thanks for the advice. This is the 2 lines from my fstab drive, just replace the <....> with the correct drive info:

UUID=<Drive ID> /media/<user>/<NewVolume1>  ntfs-3g permissions,auto,nosuid,nodev,nofail    0   0

UUID=EEBB-75D5 /media/<user>/<NewVolume1>   vfat    defaults,uid=1000,gid=1000,nosuid,nodev,nofail  0   0
1

After struggling with this problem I found an extremely simple solution. I installed and ran a program called ntfs-config. Plex could then read the contents of my two ntfs drives, one external and the other internal with only two clicks per drive.

1

I fixed my problem by just removing the user out of the line. I was under root in gedit, in the etc/fstab. I noticed that I could play videos on another drive and it was mounted as /media/HHD. So I just removed the user and the rebooted and now Playing the Moive Cars for my 3 yr old

UUID=528A041A7B1FE95D   /media/user/Movies_2TiB ntfs-3g

So it looks like

UUID=528A041A7B1FE95D   /media/Movies_2TiB  ntfs-3g

I've been reading and trying things for two days now .. but how simple this was.

I hope that this helps someone out there and saves them time.

0

Navigate to the media folder by typing this in the terminal

cd /media/

Then type

sudo chmod 777 <user>

Enter the admin password. You are good to go. Now try to access the folders in the external HDD from plex.

Note :

<user>

is the folder name found inside the media folder. (when you navigate to cd /media/ in the terminal)

0

The only solution working for me :

You need to change the user for the Plex Media Server, instead of the user "plex" you must use your linux user.

sudo vim /etc/default/plexmediaserver (or use nano instead of vim)

PLEX_MEDIA_SERVER_USER=yourLinuxUser

sudo mkdir /plex

sudo chmod -R 777 $USER:$USER /plex

sudo chown -R $USER:$USER /plex

Place all your media files and folders in /plex

It should now work immediately. For me it does. If not restart your computer.

0

Finally I used Menu → Preferences → Disks to compare properties of the two drives. Only one difference was under Edit mount options… The internal SSD was set to manual mount options with the Mount at Start-up box checked. The USB drive was set to automatic mount options with the box unchecked.

  • I should say I change to setting to manual mount options and mount at start-up and it finally worked. – MrExactlyWhat Mar 3 '18 at 22:20
0

I was still facing issues using 18.04;

So I installed Eiciel *(ACL program)

I found that because I had older installs of OS's that had the same username, I had to add all the duplicates. Once done, the change to their plexmediaserver.service file worked;

0

I did not have to edit any files or change my drive content permissions, or give plex access to my user account. All I ended up doing is making a new folder under /media called "plex" so it was /media/plex, and gave it permissions plex:plex as follows:

cd /media
sudo mkdir plex
sudo chown plex:plex plex

Then, I listed my drives to see the device so I could mount it to the plex folder:

sudo blkid -o list

The above command showed that my ext4-formatted external drive happened to be on /dev/sdb1, so I mounted it as follows:

sudo mount -t ext4 -o defaults /dev/sdb1 /media/plex

That mounted the drive to /media/plex. My movies are inside of that drive under another sub-folder called movies, so all the files are actually in:

/media/plex/movies

Anyways, I went back into Plex and added the library, it let me click on the /movie/plex folder no problem, it even found the sub-folders and everything worked perfectly, it detected all the movies!

No need to reboot or restart the server or anything.

I'm on Ubuntu Studio 18.04.2 LTS using Plex Media Server 1.15.4.994.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.