Unable to load any media files in a new Install on Raspberry Pi.

server-raspberry-pi

#1

I decided to move my plex server to a raspberry pi to free up my main computer. I got in all installed and up and running with the directions from dev2day.

I've tried adding the libraries in two different ways.

  1. I copied everything from my /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/ to the new pi. Same foler location, but upon restart of plex, I cant even get into the web interface. So I gave up on this attempt

  2. I tried a fresh capture of all my media, but nothing is adding to the library, I can see the folders if I select view folders, but I cannot see the files. I should note, the directory structure and naming works fine on my original Plex machine, So I know its not a naming issue.

I restarted plex with empty logs. Here is my Plex Med Sever.log
https://hastebin.com/owufabeyob.go

Edit. I should add that plex is starting with the pi user and the /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/ folders are owned by pi


#2

I see right at the beginning:

Error opening file ‘/var/lib/plexmediaserver/Library/Application Support/Plex Media Server//plexmediaserver.pid’ - Permission denied (13)
May 19, 2018 10:49:38.445 [0x745070d0] ERROR - Error writing pid file: /var/lib/plexmediaserver/Library/Application Support/Plex Media Server//plexmediaserver.pid

Your problem is related to the ownership and rights of the /var/lib/plexmediaserver hierarchy.

It is good policy to run a daemon as a nonprivileged user, plex in this case

Carefully fix that for all levels of the tree. It should be plex:nogroup and 755.


#3

@eckarth said:
I see right at the beginning:

Error opening file ‘/var/lib/plexmediaserver/Library/Application Support/Plex Media Server//plexmediaserver.pid’ - Permission denied (13)
May 19, 2018 10:49:38.445 [0x745070d0] ERROR - Error writing pid file: /var/lib/plexmediaserver/Library/Application Support/Plex Media Server//plexmediaserver.pid

Your problem is related to the ownership and rights of the /var/lib/plexmediaserver hierarchy.

It is good policy to run a daemon as a nonprivileged user, plex in this case

Carefully fix that for all levels of the tree. It should be plex:nogroup and 755.

I did the install based on these instructions here : removed link to bad tutorial by mod
Step 6 says to change it to the pi user. Should I reset it all back to the plex user?

This is the current permissions level

root@Plex_PI:/var/lib/plexmediaserver/Library/Application Support/Plex Media Server# ls -lah
total 1.5G
drwxr-xr-x 8 pi pi 4.0K May 19 01:59 .
drwxr-xr-x 3 pi pi 4.0K May 18 19:39 …
drwxrwxrwx 4 pi pi 4.0K May 19 12:54 Cache
drwxrwxrwx 3 pi pi 4.0K May 18 19:39 Codecs
drwxrwxrwx 3 pi pi 4.0K May 18 19:39 Crash Reports
drwxrwxrwx 3 pi pi 4.0K May 19 12:54 Logs
-rwxrwxrwx 1 pi pi 1.5G May 18 20:54 plex.zip
drwxrwxrwx 3 pi pi 4.0K May 18 19:40 Plug-ins
drwxrwxrwx 7 pi pi 4.0K May 18 19:39 Plug-in Support


#4

Update: Thanks! I changed the permission back to plex. and set up the folder as plex:nogroup. Then set it as 755. rebooted and it works!!!


#5

Congratulations!

Not everybody who wants with best intention to do the community a favor and writes instructions does really grasp all the aspects and therefore produces suboptimal advice.

A server process or daemon in UNIX speak should run in the space of a nonprivileged user. I.e. a user who cannot open a login shell. It should only be able to modify the files it needs to modify and to read what it needs to read. Any code might go berserk and then do things nobody anticipated. That is the reason why rights and privileges exist in the first place. They prevent you from discovering that unfortunate things happened.

And if someone manages to hijack the user plex, he can do less harm.