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!
I may be overlooking something to make it much more simple.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.