Directory deletion not propagating - Directory contains unexpected files

I have a server and client running Syncthing v1.1.4. The server is set to “send only” and the client is set to “receive only”. I do not have any ignore patterns set for either device. When I delete a directory from the server, the directory and contents are shown as “out of sync” on the server. The directory (not the contents) are shown as “out of sync” and a “failed item” on the client. The error on the client is “syncthing: delete dir: directory contains unexpected files, scheduling scan”. It seems to be trying to delete the directory without deleting the contents. Is there something I am doing wrong?

Please post screenshots from both sides .

Is one side Windows and the other any other kind of OS? Then check for paths which are the same except for case.

Here are screenshots of each side:

I just noticed that the contents of the deleted directories are in the “Locally Changed Items” list, preventing their deletion.

My goal is a setup where the client is kept in sync with the server, but the server is protected from any changes on the client side. I know I can probably just hit the “Revert Local Changes” button to delete these files, but I would prefer an automated solution.

There is no automated solution as it’s a destructive action, which we will not automate.

Use permissions to prevent whoever is creating those files from creating them, or perhaps use periodic rsync instead, as it’s unidirectional and using a bidirectional sync software is somewhat overkill.

Just to be sure I understand - even if this was set up to be completely bidirectional, deletion of files will not be propagated by design?

They will, because that is what bidirectional means.

Syncthing doesn’t do real unidirectional as it refuses to overwrite local modifications to prevent potential data loss.

If you want to make B an exact copy of A, even if that means deleting local files on B, or undoing modifications made by B, there is no way to do that automatically, as these are destructive actions, hence need manual intervention.

Got it. That behavior makes sense to me.

I do think Syncthing could handle these situations in a more clear way, rather than generating errors. Perhaps instead of marking the files as locally changed, they could be flagged for deletion pending approval.

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