Syncing folders for multiple users

Hi - first off: thanks for this great project!

I am using synthing on my qnap device and am wondering how to tweak the settings to prevent messing with the user permissions in their homefolder.

Thats how the homefolders look like: -rw-rw-rw- 1 test everyone Somefile

Syncthing is running under admin:administrator and when a file is copied into testusers homedirectory: -rw-rw-rw- 1 test everyone Somefile drwxr-xr-x 5 admin administ NewFolder -rw-r–r-- 1 admin administ SomeNewFile

Of course user “test” cannot modify those new files/folders created by syncthing in his homedirectory. I dont want to mess around globally with umask as I dont know if this has impact on other systemservices of that qnap device.

How to deal with this situation? Is there a setting to define a user/group for each synced folder pair when writing new files?

any hint is appreciated, licht

News files will always be created with the user and group which is running Synchting. You have 2 choices:

  1. Run a separate Syncthing instance for each user. (Probably not going to work on a low power NAS)
  2. Set the ignore permissions setting in the Syncthing folders and modify the startup script to set umask to 0000 before starting syncthing.
1 Like

Hi wweich, thanks for your answer!

Running seperate instances is not too elegant - but there is a quadcore and 8 GB ram living in there… maybe I will give this a test.

are my assumptions for solution #2 correct:

  • setting umask to 0000 will have an impact to other system services on the box
  • the separation of the users home dirs is broken

No, they are not correct ;).

If you set the umask inside the script which starts syncthing (I don’t know how you start it) it should only be set for syncthing.

Each user will still have his/her own home dir with his/her files. But the files created by syncthing will be owned by admin:adminst, As the users homedir will stil have the “normal” permissions, no one else should be able to look into it.

2 Likes

@Wweich - works like a charm… thanks for the hint! :slight_smile:

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