Server Version#: 1.41.6.9685
Player Version#: N/A
I had Plex server running on an older raspberry pi with an old raspberry OS distribution. I wanted to move to a faster pi for various reason and refresh the install at the same time so built a new Pi, installed plex, copied the /var/lib/plexmediaserver/Library/ across and all the media (while it was stopped).
The new version of the OS has you login as a user other the pi, so the media now resides in /home/tom/Music rather than /home/pi/Music. I used chown -R plex:plex on /home/tom/Music and a chmod -R 755 on the same, and also did a chown -R on the Library as the permissions were wrong and everything was read only.
Upon start up, everything looks good, I can see the library, but nothing will play because it can’t find the files. Examining the paths everything is still looking for /home/pi/Music. A search of the guides etc suggests that I add the new location as a folder to the existing library, run Scan Library and I should be sorted…sadly not.
The location chooser can see /home/tom, but not Music inside of that. I can however type in the path /home/tom/Music, save it, run the scan, nothing.
I’m guessing I’ve probably got a permission issue, but not certain, and don’t know where to go from here.
Tom
Two things to do:
Fixing permissions:
- For /var/lib/plexmediaserver (after having done the
chown)
sudo find /var/lib/plexmediaserver -type d -exec chmod 755 {} \;
sudo find /var/lib/plexmediaserver -type f -exec chmod 644 {} \;
Media file permissions
– Same permissions as above for the media directories, with your username as the owner.
Changing media locations
For each library section
- EDIT the section
- ADD the new top level directory name (DO NOT REMOVE the old)
- SAVE
- Let it find the media at this new path and add that path to the DB
- When complete,
- EDIT the section again
- DELETE the old directory path
- SAVE
- Let it remove the old path
When complete
- Empty Trash
- Clean Bundles
- Optimize DB
Thanks for the quick reply, could you explain the Media files bit please? The lines before are chmod, but for media you say specify the user, so that would be chown? But you’re saying chown to tom:tom rather than plex:plex?
Tom
This one?
For media files,
- You should own the media files ( e.g.
chown -R chuck:chuck xxxxx )
- You set 755 permission for all the directories (you have R/W/X, Plex has R/X)
- You set 644 permission for all the files (You have RW, Plex only has R)
In Linux, non-privileged usernames need 'X" permission to reach into/through the directory. We don’t really “execute” a directory but we do “transit through” a directory.
Since plex is a non-privileged username, we need to grant it permission to read each directory and file as well as go deeper into each sub-directory (the scanner)
OK, that makes sense, so I now have
but when I try to add the location I get this
suggesting that it can’t see Music, which has the permissions
If I add /Music on the end myself it doesn’t complain, but clicking Scan Library after does nothing - there is over 1.5GB so it should take a while I should image, but completes instantly.
Tom
sometimes /home is tricky.
sudo chmod 755 /home
sudo chmod 755 /home/tom
Now try.
Remember, Linux is strict about privacy. User plex can’t see tom's files unless tom gives permission