[SOLVED] Plex Media Server on CentOS 7 stopped finding media at a certain point, logs suggest otherwise

Server Version#: 1.13.9.5439
Player Version#:

Hi All,

Today I updated my Plex Media Server in hopes of fixing my issue. It did not fix it.

In perusing the forums, I was leaning towards a permissions issue, but for a small test, I invoked a scan of one of my smaller folders, and then downloaded the logs and checked them. It appears that PlexMediaServer is finding the files, but the Web portion is not displaying them? Any ideas?

Oct 20, 2018 08:44:01.429 [0x7fe4612d6700] INFO - Plex Media Scanner v1.13.9.5439-7303bc002 - ubuntu PC x86_64 - build: linux-ubuntu-x86_64 - GMT -07:00
Oct 20, 2018 08:44:01.430 [0x7fe4612d6700] INFO - Linux version: 3.10.0-862.11.6.el7.x86_64 (#1 SMP Tue Aug 14 21:49:04 UTC 2018), language: en-US
Oct 20, 2018 08:44:01.430 [0x7fe4612d6700] INFO - Processor Intel(R) Xeon(R) CPU           X3450  @ 2.67GHz
Oct 20, 2018 08:44:01.430 [0x7fe4612d6700] INFO - /usr/lib/plexmediaserver/Plex Media Scanner --scan --refresh --section 3
Oct 20, 2018 08:44:01.439 [0x7fe472f50840] DEBUG - Opening 20 database sessions to library (com.plexapp.plugins.library), SQLite 3.13.0, threadsafe=1
Oct 20, 2018 08:44:01.803 [0x7fe472f50840] DEBUG - Scanning CAM/TS Quality using en(Plex Movie Scanner) with 1 current media items and 1 section locations in the database...
Oct 20, 2018 08:44:01.804 [0x7fe45dbff700] DEBUG - HTTP requesting GET http://127.0.0.1:32400/:/metadata/notify/cullTimeline?librarySectionID=3&sinceTime=1540049041
Oct 20, 2018 08:44:01.807 [0x7fe45dbff700] DEBUG - HTTP 200 response from GET http://127.0.0.1:32400/:/metadata/notify/cullTimeline?librarySectionID=3&sinceTime=1540049041
Oct 20, 2018 08:44:02.007 [0x7fe472f50840] DEBUG - Performing a scan with 'Plex Movie Scanner' (language: en virtual: 0).
Oct 20, 2018 08:44:02.007 [0x7fe472f50840] DEBUG -   * Scanning /home/admin2/shares/Movies/CAM
Oct 20, 2018 08:44:02.008 [0x7fe472f50840] DEBUG -     * Scanning directory /home/admin2/shares/Movies/CAM (parent: no)
Oct 20, 2018 08:44:02.009 [0x7fe472f50840] DEBUG - Adding file for scanner: "/home/admin2/shares/Movies/CAM/Crazy.Rich.Asians.2018.CAM.XViD.AC3-ETRG.avi"
Oct 20, 2018 08:44:02.009 [0x7fe472f50840] DEBUG - Adding file for scanner: "/home/admin2/shares/Movies/CAM/Peppermint 2018 CAM-1XBET [NO.SAMPLE].mp4"
Oct 20, 2018 08:44:02.009 [0x7fe472f50840] DEBUG - Adding file for scanner: "/home/admin2/shares/Movies/CAM/Hellfest 2018.HDCAM.XViD.AC3-ETRG.avi"
Oct 20, 2018 08:44:02.009 [0x7fe472f50840] DEBUG - Adding file for scanner: "/home/admin2/shares/Movies/CAM/sample.avi"
Oct 20, 2018 08:44:02.009 [0x7fe472f50840] DEBUG - Adding file for scanner: "/home/admin2/shares/Movies/CAM/Venom.2018.HDTS.XViD.AC3-ETRG.avi"
Oct 20, 2018 08:44:02.014 [0x7fe472f50840] DEBUG - Skipping over directory '', as nothing has changed; removing 1 media items from map.
Oct 20, 2018 08:44:02.026 [0x7fe472f50840] DEBUG - Removing 0 media items that were left.
Oct 20, 2018 08:44:02.026 [0x7fe472f50840] DEBUG - Removing 0 directories that were left.
Oct 20, 2018 08:44:02.030 [0x7fe472f50840] DEBUG - Refreshing section 3 of type: 1
Oct 20, 2018 08:44:02.075 [0x7fe45abff700] DEBUG - Refreshing 0 IDs.

Plex Media Scanner.log (2.6 KB)

I looked into this last week, and someone else’s issue was that their PMS was not reaching the outside world, or at least in an efficient matter. Mine too was having problems, reporting that it was not accessible remotely, so I fixed that issue, but still only seeing one title on the Web version, and the log above suggests that 4 additional items were found.

I only looked at the logs from 8:44 AM, the same time that those 4 additional files were found. Please let me know what other logs I should include, or if I should include all.

I’ve seen several other reports similar to this, and I’m having the same problem.

If it’s in your HOME directory, User plex probably doesn’t have permission.

Putting media in your home is bad for this very reason.

The scanner log is not helpful.

  1. Scan files
  2. Settings - Server - Help - Download Logs
  3. Attach the ZIP file

I always suggest putting media in a neutral place (e.g. /home/media).
You own the location so you can administer but Plex is given permission to read it (Linux is VERY strict on permissions enforcement)

1 Like

Any file with sample in its file name is ignored by Plex.

My files are not in a home directory and I’ve tested permissions. Where would you like the files attached?

You may attach them here unless you are concerned about the names of the files shown.

If you are, you may PM them to me. Please also include a link back to this thread to help preserve my sanity :slight_smile: Thanks

Hi @ChuckPa, thank you for your reply.

I had an epiphany based on your response – I forgot to give some back story on my situation, which perfectly explains why some of the media worked just fine. I had Plex running on another server for several years, and must have set the umask (?) so that all newly downloaded files would have the correct permissions on that server. I moved all my library files over, and those worked fine, but anything new did not work, so it must be that the permissions are not set correctly on download.

I will fix permissions and umask settings and test from there. THANK YOU @ChuckPa

@OttoKerner I am glad plex ignores sample in the file name. I usually go back and manually remove those when I get a chance.

Since I am stubborn, I prefer to have my media files under my username.

This fixed my issue! Verifying that plex has the right permissions on my media. I will learn to set the umask correctly, but for now I did chmod -R 664 ./*

Resulting in:

-rw-rw-r--  1 admin2 admin2 1.2G Oct 11 08:59 Hellfest 2018.HDCAM.XViD.AC3-ETRG.avi
-rw-rw-r--  1 admin2 admin2 2.5G Oct 11 09:07 Peppermint 2018 CAM-1XBET [NO.SAMPLE].mp4
-rw-rw-r--  1 admin2 admin2  21M Oct 11 09:00 sample.avi
-rw-rw-r--  1 admin2 admin2 1.2G Oct 11 09:01 Venom.2018.HDTS.XViD.AC3-ETRG.avi

With the id command, I verified that plex was in the admin2 group, and in that folder, the media is now visible.

Plex Media Server Logs_2018-10-20_10-19-00.zip (2.6 MB)

setuid and setgid bits work well too in this situation. You can let the filesystem do the work.

For me, this was not related to permissions. For those of you using FreeNAS, here’s a great tutorial on setting up permissions and groups!

For those of you who might be having the same problem I was having (metadata and cover art not downloading), here is my solution:

I re-created my jail and set it up to use the “VNET” option instead of the physical interface. I had some trouble doing this at first, but I got it figured out through some trial and error. (Important note, if using VNET, be sure to set the default route). Next, I set “Allow Raw Sockets” to “True”.

I don’t know which of these two things fixed the metadata and cover art, but it’s working now!

@ChuckPa , I wanted to ask, any idea what I might have done differently before so that Plex would auto-pick up my files? It seems I never dealt with this before. Just asking for your speculation, I know it might be impossible to tell for certain. I do have access to my old drive with Plex on it though, but it needs to be mounted. It’s physically installed, if you think that would help us determine the difference between my Plex then and now, where I never had to manually alter the group settings before. My thoughts are that maybe Plex was running as my regular non-root user before? Do you advise doing that?

Thanks for your time.

There is an easy way to have your files’ permissions set for you by Linux itself once you set it up.
Once done, everything you add will be automatically adjusted as you deposit files into the monitored area. This is done by Linux itself which makes it 100% transparent to PMS.

Please read here. If you have any further questions, please let me know.

@ChuckPa
Your guide is great, but it does not seem to include scp’d files. My next thought is to maybe switch plex to run as my main user? What are your thoughts?

If I touch a file as you did in your example, it works beautifully. But when I scp a file from my source, then it does not grant r permissions to the group. Any ideas?

The guide does address the UID/GID .
The short form of the TL;DR is:

  1. Set the owner of the top level directory and subordinates (sudo chown -R )
  2. Set the group of the top level directory and subbordiantes (sudo chgrp -R)
  3. Set the permissions as you wish, (755/644 - two appliations of the find command)
  4. Apply the setgid flag ( sudo chmod g+s)
    5 Apply the setuid flag (sudo chmod u+s)

Now all files copied in, as well as all directories created will inherit the permissions and ownership of the parent directory.

To answer your question… The permissions of the parent must be so set (e.g. 755).
Check your umask in the SCP session.

To change the UID/GID PMS runs as is very trivial now.

TL;DR is:

[Service]
User=name
Group=name

followed by changing all appropriate ownership for /var/lib/plexmediaserver

Details and procedure here:

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