Today I’m not gonna talk about my experience between those, but instead I’m going to share with you on how to change Linux user that runs Plex.
By default, Plex run under
plex user. This can be neat, but not in my case. I constantly had to moving and rename files and since I am using my Linux as another user, it was not an efficient way to do this.
So I am thinking, why don’t I run Plex under the same user as I am using on my Linux now?
Before you proceed, this is not an ideal solution to the problems. I had some issues and decided to go with another solution, which is adding the user to each other’s group.
Plex runs under account
plex:plex, and let say I have a user account
firdaus:firdaus. I would just need to add user
firdaus group, and user
plex group. Then I have to make sure the folders and files of movies/series are having write permission for groups (775/664).
If you decided to go the hard way, you can continue…
Edit systemd script
First, you need to stop Plex
$ sudo systemctl stop plexmediaserver
Then edit systemd unit file.
You shouldn’t edit the file directly because it will be rewritten when an update happened. Instead we going to use
$ sudo systemctl edit plexmediaserver
Then add this configurations. Replace use
group according your like
[Service] User=user Group=group
Reload the changes
$ sudo systemctl daemon-reload
Edit Plex configuration
We also need to edit Plex configuration file
$ sudo nano /etc/default/plexmediaserver
PLEX_MEDIA_SERVER_USER to the user you want to use
Save and close the editor to proceed
Change permission of Plex files
You need to change the owner of Plex files. Replace the
group to your new user and group
$ sudo chown -R user:group /var/lib/plexmediaserver
You also need to change the owner of your movies to your new user
You are pretty much done by now.
$ sudo systemctl start plexmediaserver
Add new path to Plex
Depends on your setup. You might need to add your new movie and series path to your plex and scan the libraries.