I’m replying here, because I’m getting the same error message. I went into ssh on the server and poked around, and I’ve narrowed it down to my server no longer allowing the user ‘plex’ to not have a password. Linux has locked the user, and won’t unlock it without giving it a password.
However, I can’t find anywhere in the settings how to tell Plex what the password is, so that me adding one doesn’t break something.
Without the user being unlocked, there’s no way for it to find any of my files, is what it looks like.
User plex does not need a password. It is not a login account.
This is why the account is locked.
Further, if it had a password, it would be a huge security risk.
By default, on Linux systems (especially Ubuntu), there is no password for the ‘root’ (master administrator) account. It’s locked as well.
For Plex to see your files, you must set the directory and file permissions where you are the owner and Plex can read (minimally) or read/write (to allow deletion).
If you take the example: /a/b/c/d/file.mp4
Your username owns everything. This means, by default, it has full read/write permission to do what it wants.
For Plex to see ‘file.mp4’, it needs the following
Read/execute for /a. and for /a/b, and for /a/b/c, and for /a/b/c/d
Read permission for file.mp4
The pattern here is now becoming clear.
Directories need read+execute (execute allows us to traverse into deeper)
Files need read
The final commands which make this happen are:
find /a -type d -exec chmod 755 {}\;
find /a -type f -exec chmod 644 {} \;
755 = RWXR-XR-X (you get RWX, everyone else gets R-X, which good)
644 = RW-R–R— (you get RW, everyone else gets Read-only, which is our goal)
In actual use, here’s an example:
[chuck@lizum tv.2014]$ ls -la Babylon\ 5/Season\ 01
total 71662148
drwxr-xr-x 2 chuck chuck 4096 Aug 19 2023 ./
drwxr-xr-x 7 chuck chuck 115 Aug 19 2023 ../
-rw-r--r-- 1 chuck chuck 3310435531 Aug 19 2023 Babylon 5 - S01E01 - Midnight on the Firing Line.mkv
-rw-r--r-- 1 chuck chuck 3326924802 Aug 19 2023 Babylon 5 - S01E02 - Soul Hunter.mkv
-rw-r--r-- 1 chuck chuck 3352174652 Aug 19 2023 Babylon 5 - S01E03 - Born to the Purple.mkv
-rw-r--r-- 1 chuck chuck 3330618683 Aug 19 2023 Babylon 5 - S01E04 - Infection.mkv
-rw-r--r-- 1 chuck chuck 3347386027 Aug 19 2023 Babylon 5 - S01E05 - The Parliament of Dreams.mkv
-rw-r--r-- 1 chuck chuck 3313216573 Aug 19 2023 Babylon 5 - S01E06 - Mind War.mkv
-rw-r--r-- 1 chuck chuck 3326995890 Aug 19 2023 Babylon 5 - S01E07 - The War Prayer.mkv
-rw-r--r-- 1 chuck chuck 3312887757 Aug 19 2023 Babylon 5 - S01E08 - And the Sky Full of Stars.mkv
-rw-r--r-- 1 chuck chuck 3808252188 Aug 19 2023 Babylon 5 - S01E09 - Deathwalker.mkv
-rw-r--r-- 1 chuck chuck 3336838839 Aug 19 2023 Babylon 5 - S01E10 - Believers.mkv
-rw-r--r-- 1 chuck chuck 3328618899 Aug 19 2023 Babylon 5 - S01E11 - Survivors.mkv
-rw-r--r-- 1 chuck chuck 3275193793 Aug 19 2023 Babylon 5 - S01E12 - By Any Means Necessary.mkv
-rw-r--r-- 1 chuck chuck 3335233429 Aug 19 2023 Babylon 5 - S01E13 - Signs and Portents.mkv
-rw-r--r-- 1 chuck chuck 3421355136 Aug 19 2023 Babylon 5 - S01E14 - TKO.mkv
-rw-r--r-- 1 chuck chuck 3346559126 Aug 19 2023 Babylon 5 - S01E15 - Grail.mkv
-rw-r--r-- 1 chuck chuck 3327362395 Aug 19 2023 Babylon 5 - S01E16 - Eyes.mkv
-rw-r--r-- 1 chuck chuck 3326555004 Aug 19 2023 Babylon 5 - S01E17 - Legacies.mkv
-rw-r--r-- 1 chuck chuck 3235858573 Aug 19 2023 Babylon 5 - S01E18 - A Voice in the Wilderness (1).mkv
-rw-r--r-- 1 chuck chuck 3284331477 Aug 19 2023 Babylon 5 - S01E19 - A Voice in the Wilderness (2).mkv
-rw-r--r-- 1 chuck chuck 3084137576 Aug 19 2023 Babylon 5 - S01E20 - Babylon Squared.mkv
-rw-r--r-- 1 chuck chuck 3315754779 Aug 19 2023 Babylon 5 - S01E21 - The Quality of Mercy.mkv
-rw-r--r-- 1 chuck chuck 3335302632 Aug 19 2023 Babylon 5 - S01E22 - Chrysalis.mkv
[chuck@lizum tv.2015]$
However, when I used “sudo runuser -l plex ‘ls /media/video/’” it would tell me that the user account was not active and could not be used.
I then ran “sudo passwd -S plex” and it showed me that the user was locked.
I finally just decided to try adding a password to the user. It didn’t fix it. But then I noticed that it was still showing the user account as inactive. So I rebooted the machine, and when it came back up, I could use everything just fine.
So in the end, the only thing that I changed was giving the ‘plex’ user a password, and it then allowed plexmediaserver to browse the directories and get the library up and running again. My individual file permissions are readable by all: “-rwxr-xr-x” I probably don’t need the execute bit on these media files, but I just left it cause I didn’t see any harm either, and it was probably when I ran into some other problem and I was testing different things years ago. I keep no actual binary executable files in these directories.
Oh, and just for completeness sake, before I did these steps, I updated everything on the server and also did a system reboot to see if it would take care of it, and it did not.
So I don’t really know why it took care of it. The folders that are being pointed at are really hosted on a NAS. No clue if that has anything to do with it. The folders are mounted at boot in fstab.
/media is used by the automounter (nautilus). User ‘plex’ won’t be able to read anything mounted there for your username regardless of the permissions.
Attempting to circumvent nautilus is an exercise in futility.
Mount / place your media files in any other non-conflicting directory and you’ll have success. You will not need to contort Plex anymore.
– It will “lock down” again and everything will still function as it should.
A couple How-Tos for you to review. It’ll make this painless.
I’m attaching a full set of logs for the original thread issue for docker PMS on Unraid. Logs were made a few seconds after trying to access one of the affected files. If you recommend i run the script above I can, but it doesn’t appear to be a permissions issue for the file/path that i’m using to recreate the error. Plex Media Server Logs_2024-03-03_10-13-40 2.zip (150.2 KB)
Use a different browser for a moment or turn off the plug-ins.
They’re sending bad request(s) to Plex
Mar 03, 2024 10:13:34.025 [23075406764856] DEBUG - [Req#1b4/Transcode/Req#1be] Media Analyzer: Background analysis completed in 0.3 seconds, removing 1 IDs
Mar 03, 2024 10:13:34.032 [23075432946488] DEBUG - [Req#1b4/Transcode] Streaming Resource: Attempting to create AdHoc transcode session 4w8qgfkysef1rgfrd8vs74lv
Mar 03, 2024 10:13:34.032 [23075432946488] ERROR - [Req#1b4/Transcode] MDE: video has neither a video stream nor an audio stream
Mar 03, 2024 10:13:34.032 [23075432946488] DEBUG - [Req#1b4/Transcode] MDE: received PLEX_PROTOCOL_ANY from client, but could not determine best protocol. Defaulting to HTTP
Mar 03, 2024 10:13:34.032 [23075432946488] DEBUG - [Req#1b4/Transcode] MDE: analyzing media item 64599
Mar 03, 2024 10:13:34.032 [23075432946488] ERROR - [Req#1b4/Transcode] MDE: video has neither a video stream nor an audio stream
Mar 03, 2024 10:13:34.032 [23075432946488] ERROR - [Req#1b4/Transcode] Streaming Resource: Cannot make a decision because either the file is unplayable or the client provided bad data
Mar 03, 2024 10:13:34.032 [23075432946488] WARN - [Req#1b4/Transcode] Failed to obtain a streaming resource for transcode of key /library/metadata/57432
Mar 03, 2024 10:13:34.032 [23075542207288] DEBUG - Completed: [192.168.0.13:58680] 400 GET /video/:/transcode/universal/start.mpd?hasMDE=1&path=%2Flibrary%2Fmetadata%2F57432&mediaIndex=0&partIndex=0&protocol=dash&fastSeek=1&directPlay=0&directStream=0&subtitleSize=100&audioBoost=100&location=lan&addDebugOverlay=0&autoAdjustQuality=1&directStreamAudio=0&mediaBufferSize=102400&session=j9sl5bermrkfcx53t36g0mve&subtitles=burn&Accept-Language=en (14 live) #1b4 TLS GZIP 336ms 509 bytes (pipelined: 15)
Mar 03, 2024 10:13:34.145 [23075417951032] DEBUG - Request: [192.168.0.13:58680 (Subnet)] GET /:/timeline?ratingKey=57432&key=%2Flibrary%2Fmetadata%2F57432&playbackTime=0&playQueueItemID=76312&state=paused&hasMDE=1&time=0&duration=0 (14 live) #1c6 TLS GZIP Signed-in Token (lehmand001) (Firefox)
Mar 03, 2024 10:13:34.146 [23075417951032] DEBUG - [Req#1c6] Client [4w8qgfkysef1rgfrd8vs74lv] reporting timeline state paused, progress of 0/0ms for guid=, playbackTime=0ms ratingKey=57432 url=, key=/library/metadata/57432, containerKey=, metadataId=57432, source=
Mar 03, 2024 10:13:34.146 [23075417951032] DEBUG - [Req#1c6] [Now] User is lehmand001 (ID: 1)
Mar 03, 2024 10:13:34.146 [23075417951032] DEBUG - [Req#1c6] [Now] Device is Firefox (Firefox).
Mar 03, 2024 10:13:34.148 [23075417951032] DEBUG - [Req#1c6] [Now] Profile is Firefox
Nope, this is a headless server. There is no Nautilus installed. I have seen no conflict for many years.
Sorry about that - I should have provided more background. This server has been running Plex for at least 5 years, and probably more like 8-10 or something? It has been fine up until very recently. I’m not sure when exactly it changed, but I noticed last night when I tried to watch a movie. Though admittedly, the files used to be kept on this server, up until maybe a year ago. That’s when I moved to storing them on the NAS. Though for the entire life of the server /media has been the location that they are mounted. It was just that before it was physical hard drives attached to the server, and now they’re on the NAS instead.
Sorry PoodleRoo if this is a completely different issue, and I hijacked your thread. It showed the same error message.
Bonjour,
Je viens de changer de NAS récemment, un QNAP-HS264, et j’ai importé la base de données de mon ancien serveur sur le nouveau pour ne pas perdre toutes les modifications que j’avais déjà faites. Tous les fichiers sont bien reconnus seulement je ne peux pas les lire car j’ai le même code erreur qui s’affiche
"An error occurred trying to play “Episode name”.
J’ai aussi ajouté d’autres fichiers sur mon nouveau serveur qui n’étaient pas enregistrés sur l’ancien et donc absent de la base de données d’origine et ceux-ci se lisent bien.