[Support] Linuxserver.io - Plex Media Server


Recommended Posts

I've had some earlier posts, about the permissions granted for files that are generated by the Plex DVR using the LinuxServer.io docker.

 

I started a new thread in the general forum looking for more help on the subject https://forums.unraid.net/topic/82188-file-permissions-issue-with-plex-docker-linuxserverio/?tab=comments#comment-763917

 

I've had some help there and the most likely issue is the UMASK variable and I'm posting the basic info here so someone can look into a permanent fix.  This would only be a problem for someone using the Plex DVR feature and then also wanted to be able to move or delete files that have been created by Plex.  I know you can delete files from inside Plex, but 1. I dont want anyone logged in on a TV in my house to be able to make that mistake, and 2. There would still be a host of files and directories that can only be modified by plex, unless the "new permissions" utility is run.   

 

There is a lot more information if you go follow the thread in that link, but here are the highlights:

 

Here are the permissions shown using the ls -al /mnt/user0 command:

This folder was created using the Plex DVR

drwxr-xr-x 1 nobody users 33 Jul 30 20:05 Bxxxxxg\ (2019)/

a similar folder that was created from the old plex (Limetech docker) DVR reads like this

drwxrwxrwx 1 nobody users 52 Mayt 15 22:31 Bxxxxxxx\ (2017)/

 

His comment was: The umask 0000 needs to be called in the docker after the filesystems are created - in whatever entrypoint script is being used. I'd file this as a bug with the LS.IO guys on github or in their support thread. You can readily prove that the UMASK isn't being set properly;

 

 EDIT:  attached is a screenshot of the file/folder stats created by the Plex DVR.image.png.8a69c7e6d88efbb3f3e7e5bdece448c3.png 

 

I hope this is enough to get something going.  If this is incorrect and the UMASK setting is correct already please let me know.

Edited by TODDLT
Link to comment
10 hours ago, TODDLT said:

*snip*

To back this up; I note that the umask is never being set by this docker. I think there was an assumption made that plex doesn't really "make" a lot of files not inherently used by itself. His use case is that the DVR functionality of plex does create files. Standard linux umask is 0022 which would create perms of 0644 on files and 0755 on directories. That allows the owner to read/write but not other users (such as SMB users, or anonymous SMB). The "normal" umask on unraid is 0000 which results in 0666 and 0777 for files and directories, respectively. 
I provided him a script that adds "umask 0000" after line 3 of the /etc/services.d/plex/run script of this docker. I believe this should be sufficient to resolve.

Link to comment

I'm hoping for some assistance. I switched to this docker from the LimeTech docker because it wasn't being updated and I lost live OTA TV. Anyway, I've double checked all of my mappings and they are the same but now my media is showing "unavailable" even though the mappings are correct. I tried to force it to rescan the database and it acts like it is finished but nothing changes and my content is offline. Ideas? :)

Plex Media Server Logs_2019-08-05_21-34-10.zip

Log for_ plex.htm

Edited by daniel329
Link to comment
35 minutes ago, daniel329 said:

I'm hoping for some assistance. I switched to this docker from the LimeTech docker because it wasn't being updated and I lost live OTA TV. Anyway, I've double checked all of my mappings and they are the same but now my media is showing "unavailable" even though the mappings are correct. I tried to force it to rescan the database and it acts like it is finished but nothing changes and my content is offline. Ideas? :)

Plex Media Server Logs_2019-08-05_21-34-10.zip 2.69 MB · 0 downloads

Log for_ plex.htm 13.51 kB · 0 downloads

I think I fixed it! My mappings were correct in the docker settings but they weren’t carrying over to plex settings. They were showing under settings and libraries as /data/TV and /data/Movies instead of /mnt/TV and /mnt/Movies. Once this was corrected files began re-linking

Link to comment

So I'm attempting to move from binhex-plexpass docker to the linuxserver.io plex docker. I made sure to map the media in the same place as it was on my old docker and transferred the Plex Media Server folder from the old dockers appdata folder to the new one. All seems well until I try and play something. Every video I've tried just sits there like it's loading but never actually loads. I just get the spinning circle indefinitely.

 

I'm wondering if it's a permission issue of some kind but I've made sure I can access all the files from the terminal for the docker once started and everything looks fine from there. I've also tried chmod 777 to the media and config folders.

 

Does anybody have an idea of what could be causing this. I don't want to wipe my database and start from scratch as I have a good number of users and would prefer to keep all my watched data.

 

Edit: Also I have tried with the version variable set to Latest, Public and Docker and the issue happens on both the current public and the latest plexpass version.

Edited by Reallango
typo and extra info
Link to comment
20 minutes ago, Reallango said:

So I'm attempting to move from binhex-plexpass docker to the linuxserver.io plex docker. I made sure to map the media in the same place as it was on my old docker and transferred the Plex Media Server folder from the old dockers appdata folder to the new one. All seems well until I try and play something. Every video I've tried just sits there like it's loading but never actually loads. I just get the spinning circle indefinitely.

 

I'm wondering if it's a permission issue of some kind but I've made sure I can access all the files from the terminal for the docker once started and everything looks fine from there. I've also tried chmod 777 to the media and config folders.

 

Does anybody have an idea of what could be causing this. I don't want to wipe my database and start from scratch as I have a good number of users and would prefer to keep all my watched data.

 

Edit: Also I have tried with the version variable set to Latest, Public and Docker and the issue happens on both the current public and the latest plexpass version.

Looks like I figured it out. While it was attempting to load the video I tried clicking 10 sec back button and it threw a transcode error. So I went to the settings for the docker and pointed it at /appdata/plex/transcode/ and when it started back up my videos are playing again. So guess it was a permission issue for wherever it was trying to transcode to.

Link to comment
On 8/5/2019 at 5:39 AM, TODDLT said:

I've had some earlier posts, about the permissions granted for files that are generated by the Plex DVR using the LinuxServer.io docker.

 

I started a new thread in the general forum looking for more help on the subject https://forums.unraid.net/topic/82188-file-permissions-issue-with-plex-docker-linuxserverio/?tab=comments#comment-763917

 

I've had some help there and the most likely issue is the UMASK variable and I'm posting the basic info here so someone can look into a permanent fix.  This would only be a problem for someone using the Plex DVR feature and then also wanted to be able to move or delete files that have been created by Plex.  I know you can delete files from inside Plex, but 1. I dont want anyone logged in on a TV in my house to be able to make that mistake, and 2. There would still be a host of files and directories that can only be modified by plex, unless the "new permissions" utility is run.   

 

There is a lot more information if you go follow the thread in that link, but here are the highlights:

 

Here are the permissions shown using the ls -al /mnt/user0 command:

This folder was created using the Plex DVR

drwxr-xr-x 1 nobody users 33 Jul 30 20:05 Bxxxxxg\ (2019)/

a similar folder that was created from the old plex (Limetech docker) DVR reads like this

drwxrwxrwx 1 nobody users 52 Mayt 15 22:31 Bxxxxxxx\ (2017)/

 

His comment was: The umask 0000 needs to be called in the docker after the filesystems are created - in whatever entrypoint script is being used. I'd file this as a bug with the LS.IO guys on github or in their support thread. You can readily prove that the UMASK isn't being set properly;

 

 EDIT:  attached is a screenshot of the file/folder stats created by the Plex DVR.image.png.8a69c7e6d88efbb3f3e7e5bdece448c3.png 

 

I hope this is enough to get something going.  If this is incorrect and the UMASK setting is correct already please let me know.

 

You can set it now with the variable UMASK_SET. The default is 022 if not set.

  • Like 1
Link to comment

I looked through my logs and noticed 2 issues I'd love to get help on:

 

First, I'm noticing a permissioning error throughout logs complaining about access to some files in the appdata.

 

e.g.

Quote

Aug 12, 2019 14:44:27.230 [0x14eb429f4700] ERROR - Couldn't check for the existence of file "/config/Library/Application Support/Plex Media Server/Metadata/TV Shows/3/994bcc630ebaa1adc9d5f673061e4bc6908fdb0.bundle/Contents/_combined/posters/com.plexapp.agents.thetvdb_f0050b4c2b7c0bc8e1f0077aa8075c403db1e54d": boost::filesystem::status: Permission denied: "/config/Library/Application Support/Plex Media Server/Metadata/TV Shows/3/994bcc630ebaa1adc9d5f673061e4bc6908fdb0.bundle/Contents/_combined/posters/com.plexapp.agents.thetvdb_f0050b4c2b7c0bc8e1f0077aa8075c403db1e54d"

 

If I cruise through the folders and file permissions in /Library/ I'm seeing most stuff owned by nobody:users which I thnk is correct. However, I do see some files owned by root:root with 700 permissions. eg.

 

image.thumb.png.9d4a6082ae0075d3173a7024caa847c5.png

 

Inside the one of the _content directories, these are the permissions:

 

image.png.7f3a06448e383d67223078b46865e09f.png

 

THen in the offending posters directory, I see these weird permissions:

 

image.thumb.png.04125f320a3d231930801e915bf30a04.png

 

So something seems wrong that those files are owned by root:root, but have 000?

 

1. How do I fix these permissions safely?

2. How did this even happen to begin with?

 

-----

UPDATE:

I ended up just brute forcing this by fixing permissions on every file and dir in appdata:

 

chown -R nobody:users 

followed by

find . -type f -perm 000 -exec chmod 644 {} \;

find . -type d -exec chmod 755 {} \;

 

Edited by tmchow
Link to comment

 

My second issue is an error I'm seeing in logs related to ffmpeg where I'm seeing this errror:

No VA display found for device: /dev/dri/renderD128.

 

e.g. screenshot of logs:

 

image.thumb.png.72187789c6cf34ba1201b249c92ccd4d.png

 

I'm not sure if this is always been happening, but recently I added a Nvidia P2000 to my system to get HW transcoding to work (which seems to work since when I'm transcodoing, plex dashboard reports "(hw)" suffix and "watch nvidia-smi" shows the GPU is sued.

 

I also at that time replaced my CPU to an Intel Xeon that supports QuickSync, but not because I wanted to use it for transcoding, just because the CPU was free.  I'm NOT passing "--device=/dev/dri" in as extra params since I don't want to use the CPU, but i AM passing in "--runtime=nvidia" since I'm using the GPU.  Admittedly I don't' know if these things are related to the error logs.

 

Any ideas what's going on?

Link to comment

Hello all!

I have a little trouble with Plex.

Plex can't see files with blue-ray folders and .iso in my unraid shares.

I try to add alternative scanner (i use Scanning Disk Image Format Media, for which i was add folder /scanners)

But nothing happens. And no new options in PMS is appeared.

Link to comment
56 minutes ago, shteud said:

Hello all!

I have a little trouble with Plex.

Plex can't see files with blue-ray folders and .iso in my unraid shares.

I try to add alternative scanner (i use Scanning Disk Image Format Media, for which i was add folder /scanners)

But nothing happens. And no new options in PMS is appeared.

Really seems like a question for the plex forums but googling wasn't too hard. First plex.tv match on google for "plex iso":

 

 https://support.plex.tv/articles/201358273-converting-iso-video-ts-and-other-disk-image-formats/

Link to comment
13 hours ago, shteud said:

Plex can't see files with blue-ray folders and .iso in my unraid shares.

Direct quote from the link.

"Plex does not support the use of ISO, IMG, Video_TS, BDMV, or other “disk image” formats. If you wish to use those with Plex, you should convert them to a compatible format."

3 hours ago, shteud said:

Thanks. I google it. But the question was more about adding scanners in unraid plex docker. How proper add them and make them work?

"adding a scanner" whatever that means, is not going to change the fact that plex can't use .iso

Link to comment
18 minutes ago, jonathanm said:

Direct quote from the link.

"Plex does not support the use of ISO, IMG, Video_TS, BDMV, or other “disk image” formats. If you wish to use those with Plex, you should convert them to a compatible format."

"adding a scanner" whatever that means, is not going to change the fact that plex can't use .iso

I get it. ok

Link to comment

Okay I'm done pulling my hair out on my own! Every time I install Plex I almost immediately get an error. I'm already running my Plex server off of just one disk, as I don't have a cache, yet it still breaks constantly.
 

Aug 20, 2019 18:27:54.808 [0x14c040830700] ERROR - SQLITE3:(nil), 11, database corruption at line 79051 of [bf8c1b2b7a]
Aug 20, 2019 18:27:54.808 [0x14c040830700] ERROR - SQLITE3:(nil), 11, statement aborts at 23: [select count(*) from (select distinct(metadata_items.id) from metadata_items  where metadata_items.library_section_id in (2) and ((metadata_items.metadata_type=2 or metadata_items.meta
Aug 20, 2019 18:27:54.808 [0x14c040830700] ERROR - Soci Exception handled: sqlite3_statement_backend::loadOne: database disk image is malformed
Aug 20, 2019 18:27:54.809 [0x14c043bfd700] DEBUG - Completed: [redacted] 500 GET /library/sections/2/all?type=2&includeCollections=1&includeExternalMedia=1 (9 live) GZIP Page 0-107 934ms 405 bytes (pipelined: 4)
Aug 20, 2019 18:27:54.810 [0x14bfe79fc700] ERROR - SQLITE3:(nil), 11, database corruption at line 79051 of [bf8c1b2b7a]
Aug 20, 2019 18:27:54.810 [0x14bfe79fc700] ERROR - SQLITE3:(nil), 11, statement aborts at 10: [select distinct metadata_items.id as 'id', parents.id as 'parent_id', grandparents.id as 'grandparent_id', metadata_items.added_at as 'added_at', metadata_items.library_section_id as '
Aug 20, 2019 18:27:54.810 [0x14bfe79fc700] ERROR - Soci Exception handled: sqlite3_statement_backend::loadRS: database disk image is malformed

If you reboot it after this error it just spams "Starting Plex Media Server." indefinitely. 

Edited by slayerbrk
Link to comment
1 hour ago, slayerbrk said:

Okay I'm done pulling my hair out on my own! Every time I install Plex I almost immediately get an error. I'm already running my Plex server off of just one disk, as I don't have a cache, yet it still breaks constantly.
 


Aug 20, 2019 18:27:54.808 [0x14c040830700] ERROR - SQLITE3:(nil), 11, database corruption at line 79051 of [bf8c1b2b7a]
Aug 20, 2019 18:27:54.808 [0x14c040830700] ERROR - SQLITE3:(nil), 11, statement aborts at 23: [select count(*) from (select distinct(metadata_items.id) from metadata_items  where metadata_items.library_section_id in (2) and ((metadata_items.metadata_type=2 or metadata_items.meta
Aug 20, 2019 18:27:54.808 [0x14c040830700] ERROR - Soci Exception handled: sqlite3_statement_backend::loadOne: database disk image is malformed
Aug 20, 2019 18:27:54.809 [0x14c043bfd700] DEBUG - Completed: [redacted] 500 GET /library/sections/2/all?type=2&includeCollections=1&includeExternalMedia=1 (9 live) GZIP Page 0-107 934ms 405 bytes (pipelined: 4)
Aug 20, 2019 18:27:54.810 [0x14bfe79fc700] ERROR - SQLITE3:(nil), 11, database corruption at line 79051 of [bf8c1b2b7a]
Aug 20, 2019 18:27:54.810 [0x14bfe79fc700] ERROR - SQLITE3:(nil), 11, statement aborts at 10: [select distinct metadata_items.id as 'id', parents.id as 'parent_id', grandparents.id as 'grandparent_id', metadata_items.added_at as 'added_at', metadata_items.library_section_id as '
Aug 20, 2019 18:27:54.810 [0x14bfe79fc700] ERROR - Soci Exception handled: sqlite3_statement_backend::loadRS: database disk image is malformed

If you reboot it after this error it just spams "Starting Plex Media Server." indefinitely. 

There aren't much you can do, but if you are not using /mnt/disk for appdata you can start by changing that.

Apart from that, you have to wait until LimeTech fixes the issue or invest in a cache drive.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.