# Not finding library on Linux

**URL:** <https://forums.plex.tv/t/not-finding-library-on-linux/698872>\
**Category:** Plex Media Server\
**Tags:** server-linux\
**Created:** [March 10, 2021, 11:24am UTC](https://forums.plex.tv/t/not-finding-library-on-linux/698872 "2021-03-10T11:24:41Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![JouBqa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/joubqa/32/231464_2.png) [@JouBqa](https://forums.plex.tv/u/JouBqa)\
**Post date:** [March 10, 2021, 11:24am UTC](https://forums.plex.tv/t/not-finding-library-on-linux/698872/1 "2021-03-10T11:24:41Z")

</div>

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:  
[https://gist.github.com/pjobson/3811b73740a3a09597511c18be845a6c](https://gist.github.com/pjobson/3811b73740a3a09597511c18be845a6c)[Plex Media Server Logs\_2021-03-10\_13-20-18.zip](https://forums.plex.tv/uploads/short-url/AlgsniRu33wJg8FAl2VVY5PueEV.zip) (347.5 KB)

---

<div class="post-metadata">

**Author:** ![anon5074910](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@anon5074910](https://forums.plex.tv/u/anon5074910)\
**Post date:** [March 10, 2021, 11:38am UTC](https://forums.plex.tv/t/not-finding-library-on-linux/698872/2 "2021-03-10T11:38:10Z")

</div>

Checking your logs I see this

```auto
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 …

```auto
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`.

---

<div class="post-metadata">

**Author:** ![JouBqa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/joubqa/32/231464_2.png) [@JouBqa](https://forums.plex.tv/u/JouBqa)\
**Post date:** [March 10, 2021, 11:39am UTC](https://forums.plex.tv/t/not-finding-library-on-linux/698872/3 "2021-03-10T11:39:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anon5074910](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@anon5074910](https://forums.plex.tv/u/anon5074910)\
**Post date:** [March 10, 2021, 11:43am UTC](https://forums.plex.tv/t/not-finding-library-on-linux/698872/4 "2021-03-10T11:43:05Z")

</div>

> [@JouBqa](#):
>
> /media/joni/Ext4

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

```auto
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.

---

<div class="post-metadata">

**Author:** ![JouBqa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/joubqa/32/231464_2.png) [@JouBqa](https://forums.plex.tv/u/JouBqa)\
**Post date:** [March 10, 2021, 12:03pm UTC](https://forums.plex.tv/t/not-finding-library-on-linux/698872/5 "2021-03-10T12:03:09Z")

</div>

I did this and the same for my other mount point /media/joni/TOSHIBA\ EXT but nothing. Log attached[Plex Media Server Logs\_2021-03-10\_14-01-49.zip](https://forums.plex.tv/uploads/short-url/6PRhkAZlWKe85NgIqZa7GGuzEV4.zip) (400.5 KB)

---

<div class="post-metadata">

**Author:** ![anon5074910](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@anon5074910](https://forums.plex.tv/u/anon5074910)\
**Post date:** [March 10, 2021, 12:08pm UTC](https://forums.plex.tv/t/not-finding-library-on-linux/698872/6 "2021-03-10T12:08:15Z")

</div>

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 ?

```auto
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

```

---

<div class="post-metadata">

**Author:** ![JouBqa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/joubqa/32/231464_2.png) [@JouBqa](https://forums.plex.tv/u/JouBqa)\
**Post date:** [March 10, 2021, 12:14pm UTC](https://forums.plex.tv/t/not-finding-library-on-linux/698872/7 "2021-03-10T12:14:38Z")

</div>

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’

---

<div class="post-metadata">

**Author:** ![anon5074910](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@anon5074910](https://forums.plex.tv/u/anon5074910)\
**Post date:** [March 10, 2021, 12:32pm UTC](https://forums.plex.tv/t/not-finding-library-on-linux/698872/8 "2021-03-10T12:32:05Z")

</div>

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

```auto
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.

---

<div class="post-metadata">

**Author:** ![JouBqa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/joubqa/32/231464_2.png) [@JouBqa](https://forums.plex.tv/u/JouBqa)\
**Post date:** [March 10, 2021, 12:34pm UTC](https://forums.plex.tv/t/not-finding-library-on-linux/698872/9 "2021-03-10T12:34:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anon5074910](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@anon5074910](https://forums.plex.tv/u/anon5074910)\
**Post date:** [March 10, 2021, 12:36pm UTC](https://forums.plex.tv/t/not-finding-library-on-linux/698872/10 "2021-03-10T12:36:47Z")

</div>

> [@JouBqa](#):
>
> sudo chown -R plex.plex /media/joni/Ext4

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

---

<div class="post-metadata">

**Author:** ![pl\_5309](https://avatars.discourse-cdn.com/v4/letter/p/2bfe46/32.png) [@pl\_5309](https://forums.plex.tv/u/pl_5309)\
**Post date:** [March 10, 2021, 12:41pm UTC](https://forums.plex.tv/t/not-finding-library-on-linux/698872/11 "2021-03-10T12:41:13Z")

</div>

/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.

---

<div class="post-metadata">

**Author:** ![anon5074910](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@anon5074910](https://forums.plex.tv/u/anon5074910)\
**Post date:** [March 10, 2021, 12:43pm UTC](https://forums.plex.tv/t/not-finding-library-on-linux/698872/12 "2021-03-10T12:43:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pl\_5309](https://avatars.discourse-cdn.com/v4/letter/p/2bfe46/32.png) [@pl\_5309](https://forums.plex.tv/u/pl_5309)\
**Post date:** [March 10, 2021, 12:45pm UTC](https://forums.plex.tv/t/not-finding-library-on-linux/698872/13 "2021-03-10T12:45:40Z")

</div>

/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.

---

<div class="post-metadata">

**Author:** ![anon5074910](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@anon5074910](https://forums.plex.tv/u/anon5074910)\
**Post date:** [March 10, 2021, 1:01pm UTC](https://forums.plex.tv/t/not-finding-library-on-linux/698872/14 "2021-03-10T13:01:39Z")

</div>

> [@pl\_5309](#):
>
> /mnt can also be problematic defaulting to ro. Best to follow the example create the /dvr etc. and mount the drives.

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](https://forums.plex.tv/t/linux-tips/276247)

---

<div class="post-metadata">

**Author:** ![JouBqa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/joubqa/32/231464_2.png) [@JouBqa](https://forums.plex.tv/u/JouBqa)\
**Post date:** [March 10, 2021, 1:08pm UTC](https://forums.plex.tv/t/not-finding-library-on-linux/698872/15 "2021-03-10T13:08:33Z")

</div>

Plex is scanning! Thanks a ton for your help

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [June 8, 2021, 1:08pm UTC](https://forums.plex.tv/t/not-finding-library-on-linux/698872/16 "2021-06-08T13:08:42Z")

</div>

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