After update: Plex only works as admin on Synology despite having permissions

Sorry, but my linux knowledge is very limited. It consists only of a few things I googled when I had a problem with my DS. I never executed a script. I guess I have to copy your script into some sort of file, change the path in the for loop and then execute the file?
What exactly does the synalctool command? Does it just reinstate the + behind the folder permissions? Or does it just change the permissions within DSM (check the boxes), or both?

@spamschatulle_gmail_com

I will post here ( after dinner ) how to execute this using a Scheduled task on Synology.

It makes it very easy.

Enjoy your meal! I am gonna sleep now, its getting late here in Europe

Here is how to do this:

  1. Control Panel - Scheduled Tasks
  2. Create a “User defined Script”
  3. DO NOT “enable” it (It is enabled by default). You want full manual control.
  4. In the Task Settings tab, paste the script below (copy/paste from the browser) exactly as I have provided
  5. Save (OK) it.
  6. Now “Edit” it again → Task Settings.
  7. Edit the line: for D in "/volume1/Animated", replacing my share pathnames with your pathnames. Multiple quoted paths may be listed on that line, separated by a space. The names are case-sensitive so please to be exact.
  8. The script runs silently but you can opt to have it email you the output (in the other settings).
  9. When happy with your edits, Save it again (OK).
  10. The task is now ready to execute.
  11. Run the task.
  12. Review and re-add permissions to the share(s) using Control Panel - Shared Folders.

It is advised Operate on one share at a time until you are certain you understand what follow-on steps are needed.

After running the script, any special permissions which were previously granted to the listed shares will have been removed.

The default permissions assigned are:

  1. The share owner (you?) will have full Read/Write access
  2. Everyone else will have Read-Only.
  3. Shared Folders or File Station can now be used to add/remove permissions as you deem appropriate.

A. Preparation of the script - Creating

B. Pasting in the actual script from below +

C. Running the script to set the permissions.

The “Script” for Task Settings

#
# This script will reset and assert permissions in the each of the listed directories
# in this "for" loop.   DO NOT assert permissions on any Synology/system-reserved folders.   This could render your data inaccessible.

# Which shares are we going to work on
for D in "/volume1/Animated" 
do

 # Do this only if the name ($D) is a directory (full folder path)
 if [ -d "$D" ]; then

  # Revoke all previous permissions to a sane value
  find "$D" -type d -exec chmod 755 {} \;
  find "$D" -type f -exec chmod 644 {} \;

  # Now assert Synology ACLs so the current file owner has control
  find "$D" -type d -exec synoacltool -add {} 'owner:*:allow:rwxpdDaAaRWcCo:fd--' \;

  # Grant Read-only to everyone else
  find "$D" -type d -exec synoacltool -add {} 'everyone:*:allow:r-x------R-c-o:fd--' \;

 fi
done

Ask if questions prior to use.

1 Like

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