User does not change



I have been trying to get plex to work on my raspberry pi. I have followed the instructions here:
It works great up until where I need to change permissions. I need to change the permissions because the hard drive that is hooked up to it is owned by pi. However when I change the user to pi and restart the service. It does not ever run plex media server as pi, only as plex.
I need help, thank you in advance. I can't find anything helpful online.


@uglymagoo can help you better but that procedure was obsoleted over a year ago when systemd related init as pid 1.

I have created Linux Tips for help with such things as you wish to do now.

Of specific interest to you is customizing your Plex configuration.


Thank you so much for your help. I have followed the instructions in the customizing your plex configuaration page, and I have made progress with my plex server. It now starts a few of the processes as pi, but a few of the processes that were running when it was under plex are not there. I cannot see the server from the browser. It starts /usr/lib/plexmediaserver/plex media server, but it does not start the plex plug-in, plex dlna server, plex tuner service, or a second second plex plug-in.
I only know this because if I change it back to plex, those are the processes that start running. When I change it back to pi, I only get one.
I am assuming it has something to do with permissions, but I don't know on what. Do you have any suggestions for me?
I really appreciate your help. I actually feel like I am learning a lot about linux and what goes into a server.


do you have enough functionality to get the Plex logs from PMS? (settings - server - help - download logs)

if not, /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs contains everything I might need in addition to

sudo journalctl -xe | grep -i plex


I do not have enough functionality to download the logs, and /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs is empty. However, this is my journalctl output:

Although I just thought of something that might be it. You said that the article I followed was obsoleted a year ago. Is there a new way I should install on a raspberry pi? I looked at the installation page, and it is ubuntu based, but it is 32bit instead of 64bit. Is there a newer set of instructions I should I to try and install on a raspberry pi?


You can't run PMS as user root

Dec 29 18:54:52 frandsenplex sudo[1011]: pam_unix(sudo:session): session closed for user root
Dec 29 18:55:05 frandsenplex sudo[1038]: pi : TTY=pts/0 ; PWD=/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs ; USER=root ; COMMAND=/bin/journalctl -xe


Show me your /etc/systemd/system/plexmediaserver.service.d/override.conf please ?


Of coarse!! I really can't thank you enough. I have spent upwards of 15 hours trying to get this to work.

Customize Plex's config

Identify this as a service override


Move the data directory

Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/home/plexdir/Library/Application Support"

These values are only needed if you wish to change user & group


This is needed to change the default umask

UMask=0002 # this must be 4 digits of octal

From what I understand(which isn't much because I am still a noob) I thought pi is just a normal user, and not root. I don't really understand how I am trying to start it up as root...

**Moderator Edit:  Used triple-grave on  preceding and succeding lines for formatting**


Sorry for the weird formatting on the last comment.


I have corrected the formatting for readability.

Once you've made the edit, as I instruct in the how-to

  1. sudo systemctl daemon-reload (tell systemd you've made changes)
  2. sudo systemctl restart plexmediaserver ( restart PMS)


Before restarting:

  1. Stop PMS
  2. Change file & directory ownership 3 Now restart PMS through systemd


You were right, I had to change the permissions and ownership of the override file. I also had to change the ownership of the /var/lib/plexmediaserver folder. After that, it all started up perfectly. I am so grateful for your help. I am amazed at how quickly you responded and how helpful you were. Thank you.


I'm glad everything is working for you and that I could help.

I do my best to respond quickly but sometimes life does get in the way . haha

For future reference, /etc/systemd/system and all the files underneath it are owned by root. Only those in the Plex related directories (e.g. /var/lib/plexmediaserver and below need ownership changed to that of the new username (owner)


Generally, what is the benefit of changing the plex user from plex to pi?
I did it just because the tutorials told me and it worked.
Now after loosing some time to learn how it works with systemd I started thinking about it.


@aamzr said:
Generally, what is the benefit of changing the plex user from plex to pi?
I did it just because the tutorials told me and it worked.
Now after loosing some time to learn how it works with systemd I started thinking about it.

There is no benefit and the third party tutorials are doing it wrong. Neither the official Plex Linux guides nor my “official” Pi guide tell you to do something like that :slight_smile: It’s just that most tutorials on the net are written by people, who do not know what they are talking about :slight_smile:


EDIT: Sorry, going to post a new topic when I’ve done more research. Sorry for necroposting to this old thread!


@moviebrain If your external drive uses ext3/ext4 or any other Linux file system, then I have a nice and clean solution for you: Just create the directory “Plex Versions” at the top of your corresponding library directory and make it owned by plex (e.g. mkdir "Plex Versions" && sudo chown plex:plex "Plex Versions"). Then select the appropriate “Versions storage location” when creating optimized versions, i.e. not “in folders with original items”.

If your drive is FAT32 or NTFS you might have to change the mount options in /etc/fstab. Please tell us about your current fstab entry for your external drive.


Thank you @uglymagoo wow, of course it would be that easy :slight_smile: my brain doesn’t always completely understand permissions. Thanks for your hard work :slight_smile: it works flawlessly!

Yep, it’s ext4, and making the one folder world-readable but writable only to plex is so very clean! I sometimes forget that the things highly restricted users write can still be read by the admin user too!