# Synology NAS Permissions and Users on files transfer

**URL:** https://forum.syncthing.net/t/synology-nas-permissions-and-users-on-files-transfer/10863
**Category:** Support
**Created:** [October 24, 2017, 4:23pm UTC](https://forum.syncthing.net/t/synology-nas-permissions-and-users-on-files-transfer/10863 "2017-10-24T16:23:16Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![nano](https://forum.syncthing.net/user_avatar/forum.syncthing.net/nano/32/4170_2.png) [@nano](https://forum.syncthing.net/u/nano)
#### Post date: [October 24, 2017, 4:23pm UTC](https://forum.syncthing.net/t/synology-nas-permissions-and-users-on-files-transfer/10863/1 "2017-10-24T16:23:17Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![AudriusButkevicius](https://forum.syncthing.net/user_avatar/forum.syncthing.net/audriusbutkevicius/32/277_2.png) [@AudriusButkevicius](https://forum.syncthing.net/u/AudriusButkevicius)
#### Post date: [October 24, 2017, 5:09pm UTC](https://forum.syncthing.net/t/synology-nas-permissions-and-users-on-files-transfer/10863/2 "2017-10-24T17:09:36Z")

</div>

Syncthing doesn’t change the owner, syncthing simply creates the files as that user. If you want syncthing to create files as admin, run syncthing as admin user.

---

<div class="post-metadata">

### Author: ![nano](https://forum.syncthing.net/user_avatar/forum.syncthing.net/nano/32/4170_2.png) [@nano](https://forum.syncthing.net/u/nano)
#### Post date: [October 25, 2017, 2:16am UTC](https://forum.syncthing.net/t/synology-nas-permissions-and-users-on-files-transfer/10863/3 "2017-10-25T02:16:32Z")

</div>

Even with “station” as my username it still uses “syncthing” as that user for files?

What would be the best way to do this? Right now I have it start upon login under my Linux Mint user “station” using: `/usr/bin/syncthing-gtk` If I try something like

> sudo -u admin syncthing or syncthing-gtk

I will get errors.

I already created “admin” as a user.

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [October 25, 2017, 4:07am UTC](https://forum.syncthing.net/t/synology-nas-permissions-and-users-on-files-transfer/10863/4 "2017-10-25T04:07:57Z")

</div>

I suspect you need more Synology NAS specific advice than Syncthing specific advice.

---

<div class="post-metadata">

### Author: ![nano](https://forum.syncthing.net/user_avatar/forum.syncthing.net/nano/32/4170_2.png) [@nano](https://forum.syncthing.net/u/nano)
#### Post date: [October 25, 2017, 4:07pm UTC](https://forum.syncthing.net/t/synology-nas-permissions-and-users-on-files-transfer/10863/5 "2017-10-25T16:07:35Z")

</div>

I’m confused, in what way?

Are you implying that the user running the NAS package is naming them now?

All I want to know is how to get it to NOT run on my VM as the user “syncthing” by default.

---

<div class="post-metadata">

### Author: ![AudriusButkevicius](https://forum.syncthing.net/user_avatar/forum.syncthing.net/audriusbutkevicius/32/277_2.png) [@AudriusButkevicius](https://forum.syncthing.net/u/AudriusButkevicius)
#### Post date: [October 25, 2017, 4:38pm UTC](https://forum.syncthing.net/t/synology-nas-permissions-and-users-on-files-transfer/10863/6 "2017-10-25T16:38:27Z")

</div>

Syncthing doesn’t choose who to run as, syncthing just runs whatever your NAS package started it as.

---

<div class="post-metadata">

### Author: ![nano](https://forum.syncthing.net/user_avatar/forum.syncthing.net/nano/32/4170_2.png) [@nano](https://forum.syncthing.net/u/nano)
#### Post date: [October 29, 2017, 7:36am UTC](https://forum.syncthing.net/t/synology-nas-permissions-and-users-on-files-transfer/10863/7 "2017-10-29T07:36:16Z")

</div>

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:

1. SSH into the NAS with your main account.

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

3. Give it a name like [perms.sh](http://perms.sh) and then `sudo chmod 755 perms.sh` to make it executable.

4. 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.

5. 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.

---

<div class="post-metadata">

### Author: ![AudriusButkevicius](https://forum.syncthing.net/user_avatar/forum.syncthing.net/audriusbutkevicius/32/277_2.png) [@AudriusButkevicius](https://forum.syncthing.net/u/AudriusButkevicius)
#### Post date: [October 29, 2017, 10:31am UTC](https://forum.syncthing.net/t/synology-nas-permissions-and-users-on-files-transfer/10863/8 "2017-10-29T10:31:55Z")

</div>

As it was explained above, you should probably ask for advice on your NAS forum.

---

<div class="post-metadata">

### Author: ![cytec](https://forum.syncthing.net/user_avatar/forum.syncthing.net/cytec/32/4199_2.png) [@cytec](https://forum.syncthing.net/u/cytec)
#### Post date: [November 2, 2017, 5:21pm UTC](https://forum.syncthing.net/t/synology-nas-permissions-and-users-on-files-transfer/10863/9 "2017-11-02T17:21:50Z")

</div>

> [@nano](#):
>
> All I want to know is how to get it to NOT run on my VM as the user “syncthing” by default.

That’s not possible. Each SPK runs under it’s own user in DSM, while there might be the way and messing up the start/stop scripts (which i don’t recommend) everything should work pretty well since the user running syncthing is also added to two user groups (users and sc-syncthing)

Why is filebot requireing the files to be owned by admin? that doesn’t seem right to me. I’ve got Syncthing SPK running on a DS myself and never ever had any permission issues. I have multiple tools which access the files frequently and all work (maybe because all of them are in the users group ;))

EDIT: you _can_ change the user which runs synchting by changing it in the start/stop script but thats something i don’t recommend to do 😉 and you’ll have to do it everytime you’ll update the SPK… so the easyest way would be to get your Permissions setup correctly i guess

---

<div class="post-metadata">

### Author: ![nano](https://forum.syncthing.net/user_avatar/forum.syncthing.net/nano/32/4170_2.png) [@nano](https://forum.syncthing.net/u/nano)
#### Post date: [November 2, 2017, 9:39pm UTC](https://forum.syncthing.net/t/synology-nas-permissions-and-users-on-files-transfer/10863/10 "2017-11-02T21:39:34Z")

</div>

Thank you for the detailed explanation! I can live with it acting the way it does as it does not interfere with my normal user accounts.

FileBot-node is just plain strange altogether, but it works for my use at this time. If you want to look at the instructions over [here](https://www.filebot.net/forums/viewtopic.php?t=1802) it is spelled out that it must be run as admin, but not root…which leaves me scratching my head. Yes I have posted on their Forum, and linked this question in hopes of a reply.

---

<div class="post-metadata">

### Author: ![system](https://forum-uploads.syncthingcdn.net/original/2X/0/0b50e0a202b22ae6a67190759e8c868805b8ed9f.png) [@system](https://forum.syncthing.net/u/system)
#### Post date: [December 2, 2017, 9:44pm UTC](https://forum.syncthing.net/t/synology-nas-permissions-and-users-on-files-transfer/10863/11 "2017-12-02T21:44:40Z")

</div>

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