Snapd plexmediaserver and write permissions

Server Version#: Version 4.43.4
Player Version#: N/A

I am running the snap container of plexmediaserver on Ubuntu 18.x (I like the “set and forget” of it this is the first wall I’ve hit) and I am trying to determine why the plex media server is unable to do any action that requires write access to the library (such as create optimized versions) I assumed Linux permissions issues. However since the plexmediaserver processes run as root (oddly, thought it’d be user plex) and I made sure root mapping on my library’s NFS share work by manually testing, I am wondering if this is a restriction of the plexmediaservice snap, like a disk resource being read-only. I don’t know much about snapd and before I get into it I was curious if anyone had experience this sort of issue using plex on snapd.

Thanks.

UPDATE: I was actually able to verify that Plex was creating the directory structure for optimized versions but it is failing on the created directory not being writable. This is what the debug logs say so I have no idea why this would be the case. I actually see a bin file created in the correct location named “7192ec8c-e448-4234-87e8-b82c254c8de8” but it is of zero length. This would indicate the problem is NOT the permissions of the target dir but somewhere else, assuming the debug message is not a red herring.

UPDATE 2: I can see now that the problem is that plex is running as root. Since root is mapped to an admin user on the NAS the folders it creates only writable by the owner which comes back as 1024 - the UID of Synology admin. Also the permissions of the folders are 755. If I could insert a mask so that pms would create the folders as 775. Synology does offer the option to not map root to admin so maybe it will preserve the UID.

Once I stopped masking root I was able to optimize. It’s a far cry from ideal but unlike my old QNAP NAS, Synology is very inflexible with UID/GID management (you cannot change them or even set them), root mapping is even worse, and the “unix support” is basically a 022 mask on everything which is either on or off.

TL;DR: While Plex running as root is problematic and I suspect trying to change that in snap and have it actually still work will not be a snap, this is really something I need to work around with the NAS, not Plex.

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