Unable to access external hard drive folders in ubuntu

Server Version#: 1.21.0.3711
Software: Ubuntu 20.04.1 LTS, 64 bit
GNOME Version 3.36.3

I am trying to set up libraries on my PMS using files from an external hard drive. I have followed the directions here:

and am still unable to browse to the folder with my media content when trying to set up the library. The only difference I can identify between my approach and that in the forum article is I set the mount point to /disks/“name of my ext HD”

Any help would be much appreciated.

Thank you!

One step, often overlooked, is setting directory permissions before mounting the HD.

The general sequence:

  1. mkdir -p /mount-point/path - make what you need
  2. chown -R owner:owner /mount-point – set ownership so you are in control
  3. chmod -R 755 /mount-point - Set 755 (you have R/W, everyone else has R)
  4. mount the disk
  5. now do the pair of find commands again to set permissions of the file system itself ( IF ext4 )

Unfortunately that did not work. still unable to see folder when I try to create a new library. any other suggestions?

@pmscholtt

Show me the /etc/fstab entry for this.

I was initially trying to mount in a directory I had previously created called “disks”, but after having difficulty went though your example ste; by ste; and set up the dir “usb” as is now reflected in this file. unfortunately it still doesn’t seem to work. see below for the info you requested. Thanks!

 #/etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda2 during installation
UUID=13d4dede-5c87-49e1-9615-ca894990e862 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda1 during installation
UUID=CA13-F701  /boot/efi       vfat    umask=0077      0       1
/swapfile                                 none            swap    sw              0       0
#Additions for external and internal drives
#Mount My Book (vfat) at /disks/mybook for Plex
UUID=3717-D230 /disks/mybook	vfat defaults,auto,rw,nofail  0 0

#Mount Bad Ext Drive (hfsplus) at /disks/badexthd for Plex
UUID=55beffd3-9b19-3e2a-85db-8d35bb13a956 /disks/badexthd hfsplus defaults,auto,force,rw,nofail 0 0

#Mount Media Drive (ext4) at /usb/MyMedia for Plex
UUID=d8f4611d-bf4c-403f-a57d-4970e04ebe3e /usb/MyMedia ext4 defaults,auto,rw,nofail 0 1

Moderator Edit: Legibility

This tells me you are mounting the UUID 3717-D230 on /disks/mybook.

Before this mount occurred, did you set permissions 755 for /disks and /disks/mybook ?

(I often forget to)

Ok, I went back to mounting my external drive called “MyMedia” to the location /disks/MyMedia.

I went through very deliberately setting permissions with and without the disk mounted as outlined in both of your prior responses and still no luck. I can get the external drive to mount and unmount but plex doesn’t display the folder at all. In fact, I don’t even see the location “disks” when I attempt to create a library so I do suspect this has something to do with the permissions being set. I’m very greatful for the help. Please let me know what other information you need to help troubleshoot. Thanks!

Show me the directory listing please? (ls -la)

sorry. Directory listing of the mount point.

ls -la /disks

sorry -

that looks good. are the permissions the same below those points?

Dir = 755
File = 644

?

Yes, just confirmed this

I’m still working hard to get more familiar with unix, so forgive me if this is basic, but I just tried unmounting the drive and it would only allow me to do this from root. Is this the way it should be set up? Is the fact that I can only mount and unmount the drive from root, yet trying to run plex with me as user perhaps preventing plex from seeing those directories and folders?

All device operations (includes mounting / unmounting devices).
If you’re coming from Windows, you can equate this to “System tasks must be done as the admin – and it will always require authentication before doing so”

Linux is that strict about permissions from files in your own directory to files someone else has.

Regarding the hard drive.:

The sequence I wrote and placed in server-linux-tips is how it’s done.

You substitute the device names and drive labels to suit your local configuration but the procedure, when followed, works every time.

If you want to show me each of your intermediate steps, maybe we can see where it went off track.

Ok, got it. Sounds good. I’ll do my best to show you what I’m doing step by step here and hopefully you can help catch the error. I really appreciate the help.

Please see below for pasted text and commands and output generated during setup.

Interestingly “ls /disks/*” did not really generate that much output. I’m not sure if that clues you in.

Also here is etc/fstab:

image.png

And after completing all the steps I go to plex to search folders to add media and see the following:

image.png

I know I’m probably overlooking something simple, but can’t seem to quite figure it out. Please let me know if there is any other information I can provide to help you help me!

Here is all the text from my setup commands:

paul_scholten@paul-MacBook:~$ df
Filesystem       1K-blocks      Used   Available Use% Mounted on
udev                979212         0      979212   0% /dev
tmpfs               201528      3264      198264   2% /run
/dev/sda2        244568380  15695592   216379732   7% /
tmpfs              1007632    316324      691308  32% /dev/shm
tmpfs                 5120         4        5116   1% /run/lock
tmpfs              1007632         0     1007632   0% /sys/fs/cgroup
/dev/loop0          100224    100224           0 100% /snap/core/10444
/dev/loop1           56704     56704           0 100% /snap/core18/1932
/dev/loop2          100224    100224           0 100% /snap/core/10577
/dev/loop3           56832     56832           0 100% /snap/core18/1944
/dev/loop4            2304      2304           0 100% /snap/gnome-system-monitor/145
/dev/loop5          261760    261760           0 100% /snap/gnome-3-34-1804/36
/dev/loop6          223232    223232           0 100% /snap/gnome-3-34-1804/60
/dev/loop7            2304      2304           0 100% /snap/gnome-system-monitor/148
/dev/loop8           63616     63616           0 100% /snap/gtk-common-themes/1506
/dev/loop9           52352     52352           0 100% /snap/snap-store/498
/dev/loop10          52352     52352           0 100% /snap/snap-store/518
/dev/loop12          93184     93184           0 100% /snap/plexmediaserver/149
/dev/loop13         177152    177152           0 100% /snap/spotify/43
/dev/loop11         173440    173440           0 100% /snap/spotify/42
/dev/loop15          66432     66432           0 100% /snap/gtk-common-themes/1514
/dev/sda1           523248      7988      515260   2% /boot/efi
tmpfs               201524        24      201500   1% /run/user/1000
/dev/sdb2      11625227720 591960068 10447317344   6% /disks/MyMedia
/dev/loop16          93184     93184           0 100% /snap/plexmediaserver/154
paul_scholten@paul-MacBook:~$ sudo sh
[sudo] password for paul_scholten: 
# chown -R paul_scholten:paul_scholten /disks
# chmod -R 755 /disks
# ls -la /disks
total 20
drwxr-xr-x  5 paul_scholten paul_scholten 4096 Jan 18  2020 .
drwxr-xr-x 26 root          root          4096 Dec  9 23:42 ..
drwxr-xr-x  2 paul_scholten paul_scholten 4096 Dec 14  2019 badexthd
drwxr-xr-x  2 paul_scholten paul_scholten 4096 Jan 12  2020 mybook
drwxr-xr-x 10 paul_scholten paul_scholten 4096 Jan 22  2020 MyMedia
# flkid /dev/sdb2
sh: 4: flkid: not found
# bldkid /dev/sdb2
sh: 5: bldkid: not found
# blkid /disks/MyMedia
# blkid /dev/sdb2
/dev/sdb2: LABEL="MyMedia" UUID="d8f4611d-bf4c-403f-a57d-4970e04ebe3e" TYPE="ext4" PARTUUID="4d48c56e-8c78-473b-9bac-e250aef0583b"
# gedit /etc/fstab   

(gedit:22267): Tepl-WARNING **: 21:43:32.872: GVfs metadata is not supported. Fallback to TeplMetadataManager. Either GVfs is not correctly installed or GVfs metadata are not supported on this platform. In the latter case, you should configure Tepl with --disable-gvfs-metadata.
# blkid /dev/sda1
/dev/sda1: UUID="CA13-F701" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="6d674713-270a-4791-abcb-f2381a8a0871"
# df
Filesystem       1K-blocks      Used   Available Use% Mounted on
udev                979212         0      979212   0% /dev
tmpfs               201528      3320      198208   2% /run
/dev/sda2        244568380  15696460   216378864   7% /
tmpfs              1007632    316212      691420  32% /dev/shm
tmpfs                 5120         4        5116   1% /run/lock
tmpfs              1007632         0     1007632   0% /sys/fs/cgroup
/dev/loop0          100224    100224           0 100% /snap/core/10444
/dev/loop1           56704     56704           0 100% /snap/core18/1932
/dev/loop2          100224    100224           0 100% /snap/core/10577
/dev/loop3           56832     56832           0 100% /snap/core18/1944
/dev/loop4            2304      2304           0 100% /snap/gnome-system-monitor/145
/dev/loop5          261760    261760           0 100% /snap/gnome-3-34-1804/36
/dev/loop6          223232    223232           0 100% /snap/gnome-3-34-1804/60
/dev/loop7            2304      2304           0 100% /snap/gnome-system-monitor/148
/dev/loop8           63616     63616           0 100% /snap/gtk-common-themes/1506
/dev/loop9           52352     52352           0 100% /snap/snap-store/498
/dev/loop10          52352     52352           0 100% /snap/snap-store/518
/dev/loop12          93184     93184           0 100% /snap/plexmediaserver/149
/dev/loop13         177152    177152           0 100% /snap/spotify/43
/dev/loop11         173440    173440           0 100% /snap/spotify/42
/dev/loop15          66432     66432           0 100% /snap/gtk-common-themes/1514
/dev/sda1           523248      7988      515260   2% /boot/efi
tmpfs               201524        24      201500   1% /run/user/1000
/dev/sdb2      11625227720 591960068 10447317344   6% /disks/MyMedia
/dev/loop16          93184     93184           0 100% /snap/plexmediaserver/154
# umount /disks/MyMedia
# mount /disks/MyMedia
# ls /disks/*
/disks/badexthd:

/disks/mybook:

/disks/MyMedia:
'ASIPP DVD'   Movies  'Music Videos'   Workouts
 lost+found   Music   'TV Shows'
# 

----------------------------Restarted computer as instructed after this step ------------------

paul_scholten@paul-MacBook:~$ ls /disks/*
/disks/badexthd:

/disks/mybook:

/disks/MyMedia:
'ASIPP DVD'   Movies  'Music Videos'   Workouts
 lost+found   Music   'TV Shows'
paul_scholten@paul-MacBook:~$ df
Filesystem       1K-blocks      Used   Available Use% Mounted on
udev                979212         0      979212   0% /dev
tmpfs               201528      3244      198284   2% /run
/dev/sda2        244568380  15664220   216411104   7% /
tmpfs              1007632    314704      692928  32% /dev/shm
tmpfs                 5120         4        5116   1% /run/lock
tmpfs              1007632         0     1007632   0% /sys/fs/cgroup
/dev/loop1          100224    100224           0 100% /snap/core/10577
/dev/loop0          100224    100224           0 100% /snap/core/10444
/dev/loop2           56832     56832           0 100% /snap/core18/1944
/dev/loop4          261760    261760           0 100% /snap/gnome-3-34-1804/36
/dev/loop3           56704     56704           0 100% /snap/core18/1932
/dev/loop5          223232    223232           0 100% /snap/gnome-3-34-1804/60
/dev/loop6            2304      2304           0 100% /snap/gnome-system-monitor/148
/dev/loop7            2304      2304           0 100% /snap/gnome-system-monitor/145
/dev/loop8           66432     66432           0 100% /snap/gtk-common-themes/1514
/dev/loop9           63616     63616           0 100% /snap/gtk-common-themes/1506
/dev/loop10          93184     93184           0 100% /snap/plexmediaserver/149
/dev/loop11         173440    173440           0 100% /snap/spotify/42
/dev/loop12          52352     52352           0 100% /snap/snap-store/518
/dev/loop13          52352     52352           0 100% /snap/snap-store/498
/dev/loop14         177152    177152           0 100% /snap/spotify/43
/dev/loop15          93184     93184           0 100% /snap/plexmediaserver/154
/dev/sda1           523248      7988      515260   2% /boot/efi
/dev/sdb2      11625227720 591960068 10447317344   6% /disks/MyMedia
tmpfs               201524        20      201504   1% /run/user/1000
paul_scholten@paul-MacBook:~$ su
Password: 
su: Authentication failure
paul_scholten@paul-MacBook:~$ sudo sh
[sudo] password for paul_scholten: 
# find /disks/MyMedia -type d -exec chmod 755 {} \;
# find /disks/MyMedia -type f -exec chmod 644 {} \;
#

Moderator Edit to add formatting for Code

It would seem to me that you add /disks/MyMedia/Movies to your movies library and /disks/MyMedia/TV Shows to your TV library as the respective top level directories.

If you have Name (year)/Name (Year).ext structure under Movies, you’re good.
Similarly, if you have Name/Season xx/Name - SxxExx - optional title.ext under TV Shows, you’re also good.

Agreed, but I don’t seem to be able to navigate to those locations from within plex. My last screen shot shows a list of the folders I’m able to see when going through that process and /disks does not show up.

your screenshots do not show in the browser. They must be local file refernces???

You can always type in the path to the directory.

I suspect: sudo chmod 755 / will cure the browsing for you.

You can always start typing the path and then browse deeper.

Oh yes, sorry, I suppose they are local file references. My apologies. Unfortunately that did not help either.