I’m running the official Plex application on TN Scale v25.04.2.6.
Plex was giving me an error ( liternally “unknown error occured” ) when I tried to play a video, and I resolved it by applying the Open POSIX ACL to the dataset it was in.
That got me wondering what user and group ID the Plex application was running as. My guess would be apps/apps user/group, but I wanted to be certain.
I tried applying environment variable PLEX_UID to the application. That resulted in an error message saying the PLEX_UID was configured by the application, so I cannot set it via env variable.
How would I find out , and , if necessary, change the user id?
The application metadata say
Application Metadata
Capabilities
CHOWN
Plex is able to change file ownership arbitrarily
DAC_OVERRIDE
Plex is able to bypass file permission checks
FOWNER
Plex is able to bypass permission checks for file operations
KILL
Plex is able to send signals to any process
SETGID
Plex is able to change group ID of processes
SETUID
Plex is able to change user ID of processes
Run As Context
UID:
0
GID:
0
Username:
root
Groupname:
root
Description:
Plex runs as root user.
So does that mean the application runs with root permissions? I don’t see how it could be otherwise. And If so, how could it not have read access to a file on any dataset? You can see the source of my confusion. I should never have to give root access to anything, since it should have access to everything.
Update 1
It looks like , despite what the metadata says, that Plex is running as the apps user.
apps 16769 16765 1 09:05 ? 00:00:11 /usr/lib/plexmediaserver/Plex Media Server
apps 18064 16769 0 09:05 ? 00:00:03 Plex Plug-in [com.plexapp.system] /usr/lib/plexmediaserver/Resources/Plug-ins-fc911a729/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.43.0.10346-fc911a729 /usr/lib/plexmediaserver/Resources/Plug-ins-fc911a729/System.bundle
apps 18272 16769 0 09:05 ? 00:00:00 /usr/lib/plexmediaserver/Plex Tuner Service /usr/lib/plexmediaserver/Resources/Tuner/Private /usr/lib/plexmediaserver/Resources/Tuner/Shared 1.43.0.10346-fc911a729 32600
apps 18363 16769 0 09:05 ? 00:00:01 Plex Plug-in [com.plexapp.plugins.WebTools] /usr/lib/plexmediaserver/Resources/Plug-ins-fc911a729/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.43.0.10346-fc911a729 /config/Library/Application Support/Plex Media Server/Plug-ins/WebTools.bundle
apps 18559 16769 0 09:05 ? 00:00:01 Plex Plug-in [com.plexapp.agents.imdb] /usr/lib/plexmediaserver/Resources/Plug-ins-fc911a729/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.43.0.10346-fc911a729 /usr/lib/plexmediaserver/Resources/Plug-ins-fc911a729/PlexMovie.bundle
So then my permissions issue changes to where I need to maintain the apps user access to a dataset for existing and new files. The only reason that I can think of for it not having access to a video file that it previously read is that permissions have changed at some point.
I’ll go through the apps that access that dataset to make sure that they are all running as the apps user. Outside of that, if someone has cooked up an automated process to make sure that a specific user has read/write access to a dataset, or even a list of datasets, that would be helpful!
