Home directory permissions reset to 700

Hello, The configuration home directory permissions get reset to 700 on syncthing startup. Is this normal, or is there a way to stop this behaviour?

Thank you!

I don’t think we change the permissions on sycthings home directory. Which home directory are you talking about? The exact path?

The config directory, confusingly also set with the -home option, does get reset to 0700. This is by design.

Hey @calmh, I do not 100% understand how the permissions work. I have a computer with multiple users and would like Syncthing to create new folders with the 770 permission so that everyone in the “users” group can access and change the files. How do I set that new folders will be created with the 770 permission property in the sync directory?

Directories we sync are created with the same permissions as on the other side, unless you have checked “ignore permissions” in which case the system umask decides (Google for that if that’s not something your familiar with).

After reading about umask on Arch Linux wiki I change the system umask to 002 but still that didn’t solve my problem. Then I read the “Ignore Permissions” again and then I saw that it only ignore permissions when scanning for changes. Then I understood that the permissions still get sync to the slave PC. After that I just run the program creating the folders with the right permissions and my problem was solved.

Thanks for your answer and help.

1 Like

You need to set “Ignore Permissions” on the device where you don’t what permissions set. So enabling that option on the source device will still cause Syncthing on the destination device to set the permissions it gets from the source.

I think there is a problem with Syncthing. I installed Syncthing in a clean Ubuntu virtualbox so that I can cancel out my Arch Linux system. And the problem still exist in Ubuntu so my Arch Linux system is not the problem.

Ubuntu default umask is 002

After making sure the umask is 002 in Ubuntu, I start Syncthing from the same terminal.

The Master send the new file with permissions “-rw-rw-r–” and the Slave PC then receive the file with the permissions “-rw-r–r--”

Ubuntu + Ignore permissions = Slave

Web Computer = Master

You sure about that? I thought it was 022…

How did you do this?

Right now, it looks like you failed to change the umask from 022 to 002 - that would explain everything you describe.

Before starting Syncthing I type in the terminal “umask and umask -S” to see the umask value are. “002” and “u=rwx,g=rwx,o=rx” but just to be sure I then type in “umask 002” so then I start Syncthing from that same terminal and this is how I did the test

You should ignore permissions on both sides probably.

I have removed the last constant component and that was the web server. After starting from scratch, I can’t seem to reproduce the problem. But I will still see if I can maybe figure out what the problem was.

Thanks for everyone help and reply’s

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