I just installed PMS on a fresh Ubuntu Server 16.04 LTS install and I would like to run Plex under a different user then ‘Plex’. Should I just edit the /lib/systemd/system/plexmediaserver.service file? And then of course chown ‘/var/lib/plexmediaserver/’. As I am new to systemd I have some concerns about this.
Will the plexmediaserver.service file not be overwritten when updating PMS? As then my run as user setting would be lost.
Should I only chown ‘/var/lib/plexmediaserver/’? Or are there more folders that need different ownership?
Is ‘/etc/default/plexmediaserver’ not used at all and can it be ignored? As there are also configurable options in there.
Also, I noticed this error from systemd, should I be worried about that?
systemd[1]: [/lib/systemd/system/plexmediaserver.service:11] Invalid escape sequences in line, correcting: “/bin/sh -c ‘LD_LIBRARY_PATH=/usr/lib/plexmediaserver /usr/lib/plexmediaserver/Plex\ Media\ Server’”
There is no folder called ‘/usr/lib/plexmediaserver/Plex Media Server’ is that supposed to happen?
Also the folder ‘/usr/lib/plexmediaserver’ is owned by root, is that OK?
Thank you!! @jant90 I was searching for this for a while.
With the default setup of plex, is not easy to add an external media folder (in my case, I have an external disk with all the media).
Changing the mount of my external disk to a directory that my user is the owner and running plex with the same user, works perfect.
I’m sorry, I can’t exactly remember nor find the guide I was referring to. Good to see you’re looking into this though! Chances are those guides haven been updated/replaced/moved to a new location in the meanwhile as well. Also I’ve moved from Ubuntu to Arch for a while now and gotten to know systemd better as well so I’m not even sure what my actual problem was back then.
Anyways, one suggestion I could make is to always use systemctl edit instead of manually creating/editing files on any systemd distro to prevent mistakes.
I’m sorry, I don’t think there is an official guide to change user, or I can’t find it! Read a lot of articles, just glad this works now. Sorry if I was wrong.
I basically wanted to mount and use exfat external HDD with Plex.
I tried the fstab method, but the HDD is removable and I remove it often, and replace it with others HDDs as well. https://support.plex.tv/articles/200288606-mounting-ntfs-drives-on-linux/ didn’t work for me (I thought exfat could work like NTFS), and fails to boot (have to read about fstab)
Anyways, it would be great if you could do a write up for exFAT hdds as well. Either fstab permissions have to be changed, or Plex can be made to run as a user in Linux.
I created the Linux Tips to try and cover all the important things. At some point I will finally get the time to write proper documentation and turn it in for publication & final QA.