Not finding library on Linux

Server Version#: 1.22.0.4163-d8c4875dd

Can’t scan libraries. Logs attached. You can see my post about it at the bottom of this guide I tried to follow:
Plex Media Permissions for Linux Noobies · GitHubPlex Media Server Logs_2021-03-10_13-20-18.zip (347.5 KB)

Checking your logs I see this

Mar 10, 2021 13:18:49.504 [0x7f06ef43ebc0] DEBUG - Scanning TV Shows using en(Plex Series Scanner) with 0 current media items and 2 section locations in the database.
Mar 10, 2021 13:18:49.555 [0x7f06ef43ebc0] DEBUG - Performing a scan with 'Plex Series Scanner' (language: en virtual: 0).
Mar 10, 2021 13:18:49.555 [0x7f06ef43ebc0] DEBUG -   * Scanning /media/joni/TOSHIBA EXT/Series_T
Mar 10, 2021 13:18:49.556 [0x7f06ef43ebc0] ERROR - Couldn't check for the existence of file "/media/joni/TOSHIBA EXT/Series_T": boost::filesystem::status: Permission denied: "/media/joni/TOSHIBA EXT/Series_T"

so you can see its a permission problem. I use the following to set my permissions …

find /mnt/Media-Server -type d -exec chmod 755 {} \;
find /mnt/Media-Server -type f -exec chmod 644 {} \;

where /mnt/Media-Server is the mount point to the root of my media. For you that looks like /media/joni/TOSHIBA EXT.

I did this according to the guide but it didn’t work:

sudo adduser joni plex [sudo] password for joni: Adding user joni’ to group plex' ... Adding user joni to group plex Done. sudo chown -R plex.plex /media/joni/Ext4/Movies sudo find /media/joni/Ext4/Movies -type d -exec chmod 775 {} \;

I’ll try that

This must me another mount you have used but logic is the same. Try

find /media/joni/Ext4 -type d -exec chmod 755 {} \;
find /media/joni/Ext4 -type f -exec chmod 644 {} \;

but you will need to do this for each mount point you have as in your logs I see /media/joni/TOSHIBA EXT so you must have multiple.

I did this and the same for my other mount point /media/joni/TOSHIBA\ EXT but nothing. Log attachedPlex Media Server Logs_2021-03-10_14-01-49.zip (400.5 KB)

Your log unfortunately still shows…

Mar 10, 2021 14:01:32.328 [0x7fd52b5fabc0] ERROR - Couldn't check for the existence of file "/media/joni/TOSHIBA EXT/Series_T": boost::filesystem::status: Permission denied: "/media/joni/TOSHIBA EXT/Series_T"
and
Mar 10, 2021 14:01:32.328 [0x7fd52b5fabc0] ERROR - Couldn't check for the existence of file "/media/joni/Ext4/Series": boost::filesystem::status: Permission denied: "/media/joni/Ext4/Series"

Could you do the following so we can see what the files actually have ?

ls -la /media/joni/
ls -la /media/joni/TOSHIBA\ EXT
ls -la /media/joni/TOSHIBA\ EXT/Series_T
ls -la /media/joni/Ext4
ls -la /media/joni/Ext4/Series

ls -la /media/joni/
total 28
drwxr-x—+ 6 root root 4096 maalis 10 13:53 .
drwxr-xr-x 3 root root 4096 marras 22 10:58 …
drwxr-xr-x 10 root adm 4096 joulu 3 00:38 Ext4
drwx------ 2 root root 4096 helmi 4 00:04 Ext41
drwxrwxrwx 1 joni joni 8192 maalis 9 21:42 ‘TOSHIBA EXT’
drwx------ 2 root root 4096 helmi 4 00:04 ‘TOSHIBA EXT1’
ls -la /media/joni/TOSHIBA\ EXT
total 1660
drwxrwxrwx 1 joni joni 8192 maalis 9 21:42 .
drwxr-x—+ 6 root root 4096 maalis 10 13:53 …
drwxrwxrwx 1 joni joni 0 maalis 25 2020 ‘$RECYCLE.BIN’
drwxrwxrwx 1 joni joni 4096 helmi 25 21:28 Comics
drwxrwxrwx 1 joni joni 8192 helmi 18 15:31 ‘Game Dev’
drwxrwxrwx 1 joni joni 16384 helmi 25 21:27 Games_T
drwxrwxrwx 1 joni joni 0 joulu 2 11:47 Godot
drwxrwxrwx 1 joni joni 4096 helmi 15 11:23 ‘Installed games’
drwxrwxrwx 1 joni joni 65536 maalis 9 21:32 Movies_T
-rwxrwxrwx 1 joni joni 904704 joulu 1 2006 msdia80.dll
drwxrwxrwx 1 joni joni 0 helmi 23 17:03 msdownld.tmp
drwxrwxrwx 1 joni joni 0 elo 27 2020 ‘Program Files’
drwxrwxrwx 1 joni joni 20480 maalis 9 21:31 Series_T
drwxrwxrwx 1 joni joni 0 joulu 11 14:50 SteamLibrary
drwxrwxrwx 1 joni joni 4096 joulu 12 06:36 ‘System Volume Information’
drwxrwxrwx 1 joni joni 0 tammi 5 13:36 .Trash-1000
drwxrwxrwx 1 joni joni 4096 loka 27 09:20 WindowsApps
ls -la /media/joni/TOSHIBA\ EXT/Series_T
total 108
drwxrwxrwx 1 joni joni 20480 maalis 9 21:31 .
drwxrwxrwx 1 joni joni 8192 maalis 9 21:42 …
drwxrwxrwx 1 joni joni 8192 huhti 12 2020 Farscape
drwxrwxrwx 1 joni joni 4096 syys 12 18:51 ‘Frank Herberts Children Of Dune - 3 Part Mini-Series Sci-Fi 2003 Eng Subs [H264-mp4]’
drwxrwxrwx 1 joni joni 8192 syys 20 16:10 ‘Harley.Quinn.S02.2160p.DCU.WEBRip.DDP5.1.x265-NTb[rartv]’
drwxrwxrwx 1 joni joni 4096 maalis 9 21:30 ‘Letterkenny.S03.1080p.HULU.WEBRip.AAC2.0.x264-monkee[rartv]’
drwxrwxrwx 1 joni joni 49152 marras 21 21:52 ‘[MTBB] Legend of the Galactic Heroes (BD 720p)’
drwxrwxrwx 1 joni joni 4096 maalis 9 21:56 ‘Patlabor ~The Mobile Police~ Early Days (1988)’
drwxrwxrwx 1 joni joni 4096 helmi 25 21:28 ‘Raised.by.Wolves.2020.S01.1080p.HMAX.WEBRip.DD5.1.x264-NTG[rartv]’
drwxrwxrwx 1 joni joni 0 kesä 25 2020 ‘Star Trek Picard’
ls -la /media/joni/Ext4
total 52
drwxr-xr-x 10 root adm 4096 joulu 3 00:38 .
drwxr-x—+ 6 root root 4096 maalis 10 13:53 …
drwxr-xr-x 4 joni joni 4096 joulu 5 07:13 Games
drwxr-xr-x 5 joni joni 4096 joulu 2 11:47 Godot
drwxr-xr-x 2 root root 16384 marras 23 14:33 lost+found
drwxr-xr-x 8 plex plex 4096 maalis 10 11:57 Movies
drwxr-xr-x 4 joni joni 4096 tammi 5 14:29 Series
drwxr-xr-x 3 joni joni 4096 joulu 2 20:48 SteamLibrary
drwxr-xr-x 9 root root 4096 maalis 10 03:02 timeshift
drwxr-xr-x 5 joni joni 4096 marras 23 21:32 .Trash-1000
ls -la /media/joni/Ext4/Series
total 16
drwxr-xr-x 4 joni joni 4096 tammi 5 14:29 .
drwxr-xr-x 10 root adm 4096 joulu 3 00:38 …
drwxr-xr-x 2 joni joni 4096 marras 27 11:59 ‘Playhouse 90’
drwxr-xr-x 8 joni joni 4096 marras 28 01:09 ‘Twilight Zone’

I can see by the permissions that the commands have not been successful as they are not what I would expect them to be.

It could be related to the user you used to run the commands and/or the fact that some ownerships on the directory are different depending on the directory, root root, joni joni, root adm. Was there any errors ?

Regardless, assuming your running as your main user and that user has sudo permission can you run again with

sudo find /media/joni -type d -exec chmod 755 {} \;
sudo find /media/joni -type f -exec chmod 644 {} \;

… and try and scan / add the library again.

Meanwhile I tried changing the owner to plex but that didn’t help
sudo chown -R plex.plex /media/joni/Ext4

It definitely seems to be chancing the permissions because it takes such a long time. But nothing changes with Plex

I’ll try that

I assume you mean sudo chown -R plex:plex /media/joni/Ext4 ?

/media has ACL’s on top of directory permission which is why it is less troublesome to create a directory and mount your media there.

2 Likes

Thanks for confirming that, it was the next thing I was going to suggest. This is why I always mount to something outside of /media and to something like /mnt.

/mnt can also be problematic defaulting to ro. Best to follow the example create the /dvr etc. and mount the drives. Follow Chuck’s Linus How-To.

1 Like

Thanks, never had trouble with it myself but that’s most like due to the distro of linux I’m using so very good advice.

@JouBqa here is the how to doc mentioned above in case you have trouble finding it Linux Tips

1 Like

Plex is scanning! Thanks a ton for your help

1 Like

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