Ubuntu 20.04 PMS: Folders invisible to the "add folder" explorer in PMS

Server Version#: 4.30.2

The problem is as following. I switched from running W10 to running Ubuntu 20.04 where i had PMS installed. I have auto mounted all the drives that I have my movies/tv shows on so they all show up in Ubuntu when i reboot.

My fstab file looks like this
UUID=CEDEF25ADEF239F3 /disks/M1 auto nosuid,nodev,nofail,x-gvfs-show 0 0
UUID=CC7E001B7E0000C6 /disks/M2 auto nosuid,nodev,nofail,x-gvfs-show 0 0
UUID=CAF87B2DF87B16C3 /disks/M3 auto nosuid,nodev,nofail,x-gvfs-show 0 0
UUID=ECD82EBDD82E85C4 /disks/S1C auto nosuid,nodev,nofail,x-gvfs-show 0 0
UUID=7478FC7E78FC4082 /disks/S1U auto nosuid,nodev,nofail,x-gvfs-show 0 0
UUID=08C0D533C0D527A8 /disks/S2C auto nosuid,nodev,nofail,x-gvfs-show 0 0
UUID=E4D40A58D40A2D7C /disks/S2U auto nosuid,nodev,nofail,x-gvfs-show 0 0

I can see all the drives and files in the Ubuntu file explorer, but not with the Plex file explorer. I cant even see the directory where the drives are (/disks) in Plex. Is this a permission issue, or what am i doing wrong?

Check out the Linux Tips & Tricks… there’s examples and guidance on how to mount your drives so the local plex user can see them.

For internal / external drives

For network drives (Samba/CIFS)

For network drives (NFS)

I have done the 1st part you mentioned here, the one with internal NTFS and ext4. My drives are all NTFS, but still after following the tips there i cannot seem to see the drives or the folder where the drives are located in Plex for some reason. After doing the chown command using my own username the output of the owner stuff looks like this:

ls -la /disks
total 588
drwxr-xr-x  9 anoneemo anoneemo   4096 juni  14 01:52 .
drwxr-xr-x 21 root     root       4096 juni  14 12:06 ..
drwxrwxrwx  1 root     root     327680 juni  10 20:11 M1
drwxrwxrwx  1 root     root     163840 juni  14 01:34 M2
drwxrwxrwx  1 root     root      40960 juni  14 01:27 M3
drwxrwxrwx  1 root     root      28672 juni  14 01:35 S1C
drwxrwxrwx  1 root     root      24576 juni  14 01:35 S1U
drwxrwxrwx  1 root     root       4096 juni  14 11:58 S2C
drwxrwxrwx  1 root     root       4096 juni  14 01:35 S2U

did you apply the chown recursively? (chown -R anoneemo:anoneemo /disks)

Yes, just did the exact same command as showed (with sudo), and i still get the exact same output on ls -la /disks

I also tried doing this on one drive only to see if this worked, but that didn’t work either.

I can also see now that i have mounted partitions of the drives and not the whole drive itself.
I have mounted: /dev/sda1 and not /dev/sda. Does this affect anything?

Okay, so i finally got ownership of /disks directory and the content. I had include uid and gid in the /etc/fstab file. So the ownership is now okay.

anoneemo@anoneemo-ubuntu:~$ ls -la /disks
total 588
drwxrwxrwx  9 anoneemo anoneemo   4096 juni  14 01:52 .
drwxr-xr-x 21 root     root       4096 juni  14 12:06 ..
drwxrwxrwx  1 anoneemo anoneemo 327680 juni  14 12:23 M1
drwxrwxrwx  1 anoneemo anoneemo 163840 juni  14 12:23 M2
drwxrwxrwx  1 anoneemo anoneemo  40960 juni  14 12:23 M3
drwxrwxrwx  1 anoneemo anoneemo  28672 juni  14 12:23 S1C
drwxrwxrwx  1 anoneemo anoneemo  24576 juni  14 12:22 S1U
drwxrwxrwx  1 anoneemo anoneemo   4096 juni  14 11:58 S2C
drwxrwxrwx  1 anoneemo anoneemo   4096 juni  14 12:22 S2U

But… the problem still is there in Plex. I still cannot see the /disks folder or the content in Plex…

have you restarted the server since you updated those settings?

If I may show a spontaneous example ?

This is what I’ve created. I grabbed a 512G external WD Passport drive

Filesystem     1M-blocks   Used Available Use% Mounted on
/dev/nvme0n1p2    122526  28933     87327  25% /
/dev/nvme0n1p1       476     25       452   6% /boot/efi
/dev/nvme0n1p4    788400 402986    385415  52% /home
/dev/sda1         468430     70    444497   1% /media/chuck/f8e50206-ea91-4dbd-9afb-90ae46486ed7
[chuck@lizum ~.502]$ mount | grep sda
/dev/sda1 on /media/chuck/f8e50206-ea91-4dbd-9afb-90ae46486ed7 type ext4 (rw,nosuid,nodev,relatime,uhelper=udisks2)
[chuck@lizum ~.503]$ sudo blkid /dev/sda1
/dev/sda1: UUID="f8e50206-ea91-4dbd-9afb-90ae46486ed7" TYPE="ext4" PARTUUID="fc7ef1e7-264f-451b-af35-d936b4d3242f"
[chuck@lizum ~.504]$ sudo mkdir -p  /example/512g
[chuck@lizum ~.505]$ ls -la /example
total 12
drwxr-xr-x  3 root root 4096 Jun 14 10:53 ./
drwxr-xr-x 35 root root 4096 Jun 14 10:53 ../
drwxr-xr-x  2 root root 4096 Jun 14 10:53 512g/
[chuck@lizum ~.506]$ sudo chown -R chuck.chuck /example
[chuck@lizum ~.507]$ sudo echo 'UUID=f8e50206-ea91-4dbd-9afb-90ae46486ed7 /example/512g ext4 defaults,auto,nofail 1 3' >> /etc/fstab
/etc/fstab: Permission denied.
[chuck@lizum ~.508]$ sudo echo 'UUID=f8e50206-ea91-4dbd-9afb-90ae46486ed7 /example/512g ext4 defaults,auto,nofail 1 3' | sudo tee -a /etc/fstab
UUID=f8e50206-ea91-4dbd-9afb-90ae46486ed7 /example/512g ext4 defaults,auto,nofail 1 3
[chuck@lizum ~.509]$ tail -1 /etc/fstab
UUID=f8e50206-ea91-4dbd-9afb-90ae46486ed7 /example/512g ext4 defaults,auto,nofail 1 3
[chuck@lizum /.510]$ sudo mount /example/512g/
[chuck@lizum /.511]$ ls -la /example/512g/
total 24
drwxr-xr-x 3 root  root   4096 Jan 30 17:50 ./
drwxr-xr-x 3 chuck chuck  4096 Jun 14 10:53 ../
drwx------ 2 root  root  16384 Jan 30 17:50 lost+found/
[chuck@lizum /.512]$ sudo chown chuck.chuck /example/512g
[chuck@lizum /.513]$ ls -l /example/512g
total 16
drwx------ 2 root root 16384 Jan 30 17:50 lost+found/
[chuck@lizum /.514]$ mkdir /example/512g/media-directory
[chuck@lizum /.515]$ ls -la /example/512g/
total 28
drwxr-xr-x 4 chuck chuck  4096 Jun 14 11:03 ./
drwxr-xr-x 3 chuck chuck  4096 Jun 14 10:53 ../
drwx------ 2 root  root  16384 Jan 30 17:50 lost+found/
drwxr-xr-x 2 chuck chuck  4096 Jun 14 11:03 media-directory/
[chuck@lizum /.516]$ df
Filesystem     1M-blocks   Used Available Use% Mounted on
/dev/nvme0n1p2    122526  28933     87327  25% /
/dev/nvme0n1p1       476     25       452   6% /boot/efi
/dev/nvme0n1p4    788400 402991    385410  52% /home
/dev/sda1         468430     70    444497   1% /example/512g
[chuck@lizum /.517]$

This type of work cannot be done in a GUI.
Please also notice the file permissions for directories:
755 (rwxr-xr-x) which allows user plex to read the diretoeis.

Yea, i’m pretty sure i rebooted the server after the changes. I’m not at home now, but will be tomorrow afternoon, so i can double check then.

Yea, i’ve done all the permissions and fstab stuff in the terminal. I think i got the permissions right if you see my comment earlier, but i’m going to double check tomorrow afternoon if i rebooted the server before i tried plex again. I will also make sure i have 755 permissions right then. Thanks for the example! :slight_smile:

Everything you see here is immediate and without need to reboot.
Rebooting does not impact file system operations in 99/100 cases.

Okay so after a bit of testing again, i still cannot see the mounted drives or the folder /disks

ls -la /disks indicatest i got the right permissions now for the disks i think.

anoneemo@anoneemo-ubuntu:~$ ls -la /disks
total 588
drwxr-xr-x  9 anoneemo anoneemo   4096 juni  14 01:52 .
drwxr-xr-x 21 root     root       4096 juni  14 12:06 ..
drwxrwxrwx  1 anoneemo anoneemo 327680 juni  14 12:23 M1
drwxrwxrwx  1 anoneemo anoneemo 163840 juni  14 12:23 M2
drwxrwxrwx  1 anoneemo anoneemo  40960 juni  14 12:23 M3
drwxrwxrwx  1 anoneemo anoneemo  28672 juni  14 12:23 S1C
drwxrwxrwx  1 anoneemo anoneemo  24576 juni  14 12:22 S1U
drwxrwxrwx  1 anoneemo anoneemo   4096 juni  14 11:58 S2C
drwxrwxrwx  1 anoneemo anoneemo   4096 juni  14 12:22 S2U

I do not know why the permissions says drwxrwxrwx instead of rwxr-xr-x as mentioned by @ChuckPa.

My fstab file is included below, to show i have the right config for that too.

UUID=CEDEF25ADEF239F3 /disks/M1         auto nosuid,nodev,nofail,x-gvfs-show,uid=anoneemo,gid=anoneemo 0 0
UUID=CC7E001B7E0000C6 /disks/M2         auto nosuid,nodev,nofail,x-gvfs-show,uid=anoneemo,gid=anoneemo 0 0
UUID=CAF87B2DF87B16C3 /disks/M3         auto nosuid,nodev,nofail,x-gvfs-show,uid=anoneemo,gid=anoneemo 0 0
UUID=ECD82EBDD82E85C4 /disks/S1C        auto nosuid,nodev,nofail,x-gvfs-show,uid=anoneemo,gid=anoneemo 0 0
UUID=7478FC7E78FC4082 /disks/S1U        auto nosuid,nodev,nofail,x-gvfs-show,uid=anoneemo,gid=anoneemo 0 0
UUID=08C0D533C0D527A8 /disks/S2C        auto nosuid,nodev,nofail,x-gvfs-show,uid=anoneemo,gid=anoneemo 0 0
UUID=E4D40A58D40A2D7C /disks/S2U        auto nosuid,nodev,nofail,x-gvfs-show,uid=anoneemo,gid=anoneemo 0 0

Okay finally i solved it… I dont know why, but when i just mounted the drives in /home/anoneemo/Drives it works just fine.

I am having a very similar issue. Were you able to figure out a different solution than moving the mounts to your home directory? My current mount point is /data1 and Plex just can’t see that mount point at all…never mind the folders in the mount point. The log has the entry “Marking media not available in /data1/Videos/Movies”. I went through all the steps of the tips like you did, but still nothing. Thanks.

@ryanprather

Permissions problem.

  1. Permissions on the directories leading to the mount point (media not mounted)
  2. Permissions in the mounted file system

Hint: 755 for directories. PMS marks unavailable if the top-most directory is not accessible.

I did everything I could think of. Full rwx on the whole tree leading up to it, data1, Videos, Movies…nothing. I tried changing the owner and group to plex. I put the plex user into the group that owns it. The thing is that the data1 directory doesn’t appear at all in the “browse for media folders”. The only thing I can come up with is that the path is mounted as an Logical Volume within a software RAID 5 array. I didn’t have any problems with this setup on CentOS7, but then something happened and it wouldn’t boot. I tried upgrading to CentOS8 and that didn’t work either. So I decided to change Ubuntu and it’s running, but I can’t get plex to see the directories. Any other suggestions?

pitfalls to watch out or:

  1. Centos is Redhat based – don’t use the /run directory root
  2. Ubuntu is Debian based – don’t use the `/media directory root.

Any of these apply?

Please consider:

try to su to your plex user and see if you can see/enter/read the files as the plex user on the shell

No. /data1 is the directory. And in it is the Videos folder which links to /dev/mapper/lvm2-videos logical volume. I already read and tried those steps. Didn’t work.