Our forum migration to Discourse is underway and scheduled to last through June 21. During the migration, the forums will be read-only, except for a single temporary forum (contents of which will not be getting transferred). Read our announcement post for more information about the forum migration.
Hey folks, there is a new Podcast category for forums https://forums.plex.tv/categories/podcasts
If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

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

neuman1812neuman1812 Members, Plex Pass Posts: 12 Plex Pass

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

Tagged:

Best Answer

  • eckartheckarth Members, Plex Pass Posts: 502 Plex Pass
    Accepted Answer

    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.

Answers

  • eckartheckarth Members, Plex Pass Posts: 502 Plex Pass
    Accepted Answer

    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.

  • neuman1812neuman1812 Members, Plex Pass Posts: 12 Plex Pass

    @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 :https://thepi.io/how-to-set-up-a-raspberry-pi-plex-server/
    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

  • neuman1812neuman1812 Members, Plex Pass Posts: 12 Plex Pass

    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!!!

  • eckartheckarth Members, Plex Pass Posts: 502 Plex Pass
    edited May 19

    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.

Sign In or Register to comment.