Plex runs as user plex, not as user pi on the raspberry pi

I installed the plex media server according to
removed link to bad tutorial by mod

Problem: the external disk is not accessible for plex.

ps -aux
tells me, that the Plex Media Server runs as user “plex”, not as user “pi”. In the file /etc/default/plexmediaserver.prev,
there is the line
PLEX_MEDIA_SERVER_USER=pi

This seems to be ignored. Why?

A look into /etc/init.d/plexmediaserver tells me, that here a file /etc/default/plexmediaserver is processed.
So I copied plexmediaserver.prev to prlexmediaserver. No effect. I even edited the /etc/init.d/plexmediaserver file and hard coded
su -l pi -c "/usr/sbin/start_pms
No effect. When I started it from command line via
su -l pi /usr/sbin/start_pms
then the Plex Media Server runs as user “pi” and the external disk is visible.

But that’s no proper solution. So my question: what has to be done, such that plex runs properly as user “pi”?

Answer:

Top of this Linux forum, please see Linux Tips subsection.

In it, please find detailed External and Internal, NTFS and EXT4 disks How-To

Enjoy :slight_smile:

@“d320687@nwytg.com” said:
I installed the plex media server according to
How to set up a Raspberry Pi Plex server - The Pi

(1) That guide is utter garbage. Don’t use it. Take a look at the official guide to learn how to use PMS on your RPi.

http://forums.plex.tv/discussion/309553/plex-media-server-for-armhf-and-arm64-using-debian-or-ubuntu

But that’s no proper solution. So my question: what has to be done, such that plex runs properly as user “pi”?

(2) Don’t! Just correctly mount your media and fix the permissions.

http://forums.plex.tv/discussion/279063/using-ext-or-ntfs-drives-internal-or-external-on-linux

And btw: the official way to change the PMS user is described below. But really, don’t do it, there is no reason!!

http://forums.plex.tv/discussion/286395/customizing-your-plex-configuration

1 Like

Thanks a lot. This


works. I summarize, what I did to enable the external disk:

  1. Created a directory for the mount point.
    sudo mkdir /mnt/disk1
  2. Attached the external disk to the Raspberry Pi.
  3. Performed the command blkid to get UUID and device type for the external disk. Among others, blkid showed a line
    /dev/sda1 UUID=“ef7a8485-2652-4c94-89ff-864997eb115d” type=“vfat” PARTUUID=“8161dcf1-09”
    I use these data in the next step.
  4. Added the following line into /etc/fstab:
    UUID=ef7a8485-2652-4c94-89ff-864997eb115d /mnt/disk1 vfat defaults,auto,rw,nofail 0 1
  5. Rebooted the Pi