Synology NAS Permissions and Users on files transfer

Support for Synology NAS, QNAP NAS and other Embedded Linux systems
Post Reply
nano
Posts: 4
Joined: 11 Oct 2017, 20:55

Synology NAS Permissions and Users on files transfer

Post by nano »

I am going to link my post from Syncthing because I think it applies in a discussion to my conclusion over here as well.

Here are my quotes transferred over:
I have been using Syncthing for a while now and have a question about permissions.

Allow me explain how my setup is being run:

Syncthing is running on my Synology NAS as the “Main Server” for my Network.

One Shared Folder is allowed access using the Group SC-Syncthing and it is called DL.

The “Client” for Syncthing is running inside a VM running Linux Mint for various other tasks, but only watching one SEND ONLY folder - Completed DL.

When files get put into the Completed DL folder they are transferred one-way back to the NAS.

I run FileBot Node on the NAS and am running into permission issues with that particular folder, because after Syncthing performs the transfer it changes the folder and files Owner to syncthing. The way this FileBot package operates is it needs the folder and files to have an Owner of admin instead.

So instead of automation I have to backtrack on a scheduled task and change the permissions each time to move the files out of that folder. I have thought about making a script on the NAS that runs behind FileBot that would change permissions of that folder & files to admin first…but that is very complex when the permissions could already be set from the beginning!

Any insight or ideas on how I can fix this would be great!
After experimenting with the /var/packages/syncthing/scripts/start-stop-status user settings,

I decided that the only clear way to overcome this limitation is to chmod the whole Directory before allowing FileBot to run it’s script:

SSH into the NAS with your main account.

Create a script using vi or nano #! /bin/sh

chmod -R 777/volume1/YOURFOLDER/Media

Give it a name like perms.sh and then sudo chmod 755 perms.sh to make it executable.

Go to your Task Scheduler and set the script user as ‘root’ and edit the time to execute as well as the location of it. I put mine inside one of my shares.

Execute your Filebot script and avoid permission errors when moving files!

*Warning this is only meant to be run at home and not in a production setting, as this makes things insecure.

I would still like to take suggestions to do this a better way.
I may be overlooking something to make it much more simple.
tosmaniac
Posts: 1
Joined: 12 Oct 2020, 20:17

Re: Synology NAS Permissions and Users on files transfer

Post by tosmaniac »

I have the same issue and looking as well for a turnaround.
So far I came up with the same solution but this is not ideal.
I would post here should I find another solution.
nano
Posts: 4
Joined: 11 Oct 2017, 20:55

Re: Synology NAS Permissions and Users on files transfer

Post by nano »

tosmaniac wrote: 12 Oct 2020, 20:20 I have the same issue and looking as well for a turnaround.
So far I came up with the same solution but this is not ideal.
I would post here should I find another solution.
I assume you are using something like Syncthing? If you are on Synology I would try their Cloudsync instead.
I think I stopped using my script a long time ago, but will check my settings and update this post if I made other adjustments.
Post Reply