I have a small number of files which fail to synchronise between systems. The error for all of them is just “operation not permitted”. I have checked all the files with this error and the syncthing process does have permission to write to them.
However the files do have a different owner on one of the systems being synchronised, will this cause the “operation not permitted” error and is there any way around it?
As I said the syncthing process does have permission to write the files everywhere but another process (with a different user) writes files into the synchronised directories and thus sometimes files with different ownership will appear.
Yes, it’s because the file has a different owner than the user running syncthing. I can resolve the error by changing the ownership of files to that of the syncthing process.
However this is a problem! In my situation there will always be files created by more than one owner in the folders I want to synchronise. Syncthing has permission to write, delete and copy any file in the folders but it isn’t always the file owner.
I don’t think ignorePermissions will halp as, if the documentation is correct, that just means to ignore file permissions when looking for changes. I need a flag to say “don’t try to chmod” when copying changed files.
You’re also not saying what operation it is that fails. For example, syncthing needs to be able to create new files in a directory, regardless of the permissions on the files themselves.
It’s failing to synchronise some files which are owned by ‘chris’ (that’s me!) on one system and by www-data (the apache2 user) on another system. Both www-data and chris have permission to write and delete files in the synchronised folder on both systems.
So again… It’s apparently attempting to do something that it’s not allowed to, but without the error message I don’t know what and can’t guide you in what to check.
I am synchronising a wiki (i.e. a web application) across three systems. The files in the wiki may be written by me (i.e. they will have owner ‘chris’) or by the apache process (when they will have owner www-data). Both ‘chris’ and ‘www-data’ have all the permissions needed to read, write and delete files in the synchronised folders.
The error message I see in the syncthing web GUI is just “operation not permitted” against a number of files which have failed to synchronise. When I look at these files it turns out that they are owned by ‘chris’ on one system and ‘www-data’ on the other.