We are running syncthing on synology. All PC on local network are synchronized correctly.
But users out of local network are connecting to synology over its WEB. They dont need all data which are synchronized on local net.
Problem: syncthing process who is running on synology is creating files and directories with correct UID and GID {syncthing:users} BUT with wrong permissions.
All users which are connecting to synology over WEB are in group “users”.
Permissions of new files and directories created by syncthing are "-rw-r–r--"
That is not good. We need “-rw-rw—” so users in group can read and write.
Trying to change umask for users syncthing on synology. This can be done over file .profile in home dir. But that is not working.
Yeah. We should probably honor the umask when the source doesn’t send the full set of permfissions (I.e. FAT file systems and our limited understanding of NTFS ACLs).
If the note next to Ignore permissions said “Use on Windows systems” rather than “Use on FAT file systems” this would probably have saved me an hour or so. All files created on windows were coming through as read only on ubuntu,
I am testing Syncthing, and i have the same problem as the original poster:
the umask of user syncthing is set to 0022 via a .profile file in the home folder
when logged in as syncthing, creating a file or directory gives the correct expected permissions (-rw-rw-r-- / drwxrwxr-x)
when a file/folder is replicated from another device (Ignore Permissions is set to true on both devices for this folder), they have incorrect permissions (-rw-r--r-- / drwxr-xr-x)
I am running the latest version: v0.12.19, Linux (ARM)
I looked a bit into the startup scripts of the Synology packages, but cannot pinpoint exactly if umask is applied properly or not
If anyone could help on this, that would be appreciated.
If you have a start script, just explicitly set the umask there before starting syncthing. Then you don’t need to worry about whether .profile is processed or not.
All the other apps used on my Synology NAS offers an option to override the permissions of files/folders, for instance Transmission, Sonarr, Couchpotato, all have an option to override either the umask, or to chmod or even chown the files they create.
I share something from my own computer, which has right set as user only (700/600), towards my NAS, which has its own ACL management, but for this to work the files and folders must be available to the Unix group, and not just the syncthing user running the daemon (770/660).
And I don’t want to change my permissions to give rights to a local computer group so that users on the nas can access the files.
Basically at the moment it’s only possible to replicate permissions (which in my opinion doesn’t mean much when the user:group on both sides are not the same at all), or ignore permissions and hope that the system on which you run ST will let you use umask correctly.
Can’t we have a new configuration per folder that let you override the permissions with new ones?
@calmh, i played around with the startup script on Synology, and got something working (or WIP at least) with proper umask, however it seems the proper umask is not applied when ST first creates a folder (when you add a folder or accept a folder from another device).