Synology keeps forgetting PlexMediaServer permissions?

Server Version#: 1.24.5.5173
Player Version#:

I recently updated to DSM7 and therefore also updated Plex Media Server. Everything is working fine except that it seems I need to redo or refresh the permissions for the “Media” folder for user “PlexMediaServer” every day. At the moment if I add a new movie to the media folder, Plex will not recognise it (even if I force “scan library”). But if I log into Synology and redo the folder permissions (even though they are already correctly set) it then allows Plex to see the new content when I “scan library”. That will continue working for a few hours until I must redo the permissions again. Very frustrating. Any ideas on how to make the permissions settings “stick”?

@capnstoobie

The permissions are lost like that because of how the files are being added.

The copy operation is setting your user permissions exclusively.

How are you adding them? SMB copy ? SCP ? Direct upload via FileStation?

There are other things to check (Control Panel - Shared Folders - recursive ACL setting)

Thanks ChuckPa, I think I understand now. I use a combination of Sonarr/Radarr or sometimes just NZBGet by itself. So, Radarr (for instance) is adding a file that only it has ownership of, and therefore Plex can’t see it.

I came across another post by yourself where you said:
3. On Synology, best permissions are either:
a. Assign no permissions in Radarr/Sonarr and let Control Panel - Shared Folders - Permissions tab handle it
b. Assign 755 for directories and 644 for files.

So are you saying to configure Radarr (for instance) to save files with 755/644 permissions? I’m using Radarr via Docker - is it the container settings I need to change to fix the permissions?

Yes. 755/644 means that

  • the PUID/GID which wrote the files (presumably your Synology username) maintains ownership
  • PlexMediaServer gets the permissions of the last digit (the “Other” value) which is Read/Execute for the directory so it can traverse it to get to the file and “4” so it can read the file.

Remember, on Synology, the default action is to inherit the permissions of the parent directory so I tend to leave these alone.

If you must set them -
In Sonarr, setting the value “755” will be edited by Sonarr to “644” (we don’t execute media files — unless they’re naughty :roll_eyes: )

This screenshot is from my currently running Sonarr configuration.

You can check the “Set Permissions” box to hard set them . I’ve never had a need to but Sonarr does run with 1000:1000 (my UID:GID)

You do need to tick the box for it to activate but you shouldn’t need it if the UID/GID match your Synology UID/GID.

Maybe that’s the problem ?

Sorry, I misread your earlier post but realised a bit later on.

I only vaguely understand how the UID/GID works so I’m not sure if they are not matching. I think I will try ticking the box and see how that goes! Thanks for your help :slight_smile:

Where is Sonarr running ? On the syno?

If so, because playing with UID/GID & Perms breaks ACLs (which is what’s happening here), we might as well consider going all the way.

  1. Create a schedule task - user script
  2. In it, there are two lines
#!/bin/sh
id PlexMediaServer
  1. Set it to email you the output because you want to see what it prints.

  2. Youll get a line line this:

chuck@ds418:~$ id PlexMediaServer
uid=297536(PlexMediaServer) gid=297536(PlexMediaServer) groups=297536(PlexMediaServer),937(videodriver)
chuck@ds418:~$ 

In your docker container, change the GID (PGID) to match that of PlexMediaServer.

What you’re doing is:

  1. All files created are owned by you
  2. All files will carry the group permission (group ID of PlexMediaserver)
  3. PlexMediaServer will be able to read the files
  4. Now set the 755 permissions in Sonarr.

Test. verify. Repeat for Radarr

Lesson to learn here – Once ACLs are broken, it’s really difficult to go back so let’s set it up perfectly.

Thanks ChuckPa, I followed your steps. After testing, I found that Sonarr worked but Radarr didn’t. I then realised it may be because I had configured nzbget to run the VideoSort script for the “Movies” category only (not “TV”). So I updated the PGID in the nzbget container as well, and now everything seems to work. Thank you very much!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.