#Snapshot folder of Synology NAS & Watchers

Hi to all,

I have setup a two way folder sync between two synology NASes with same folder structure and have added the following ignore patterns:

/#snapshot
/#recycle
/.sync
!PC1 (John)/1. PROJECTS
!PC2 (Thanos)/1-CONSULTANCY/1-Μ Ε Λ Ε Τ Ε Σ
*

I also increased inotify watchers to 204800 which as a result stopped error: ΓΡΑΦΕΙΟ failed to setup inotify handler. Please increase inotify limits, see FAQ — Syncthing documentation

However now I get another error: "For the following folders an error occurred while starting to watch for changes. It will be retried every minute, so the errors might go away soon. If they persist, try to fix the underlying issue and ask for help if you can’t. Support

ΓΡΑΦΕΙΟ error while traversing /volume1/ΓΡΑΦΕΙΟ/#snapshot/GMT+02-2024.01.11-22.45.16/#recycle: permission denied"

What does actually this error mean and how to troubleshoot it? Of course I don’t want any of #snapshot folder to be edited.

Thank you!

I guess I understand the fault.

With the previous post’s exception rules (for including files) apparently syncthing found the same structure inside #snapshot folder so it was giving that error.

Just to mention that root folder is /volume1/ΓΡΑΦΕΙΟ and then “PC1 (John)” and “PC2 (Thanos)” are first in hierarchy.

So, I tried to declare these rules explicitly: !/PC1 (John)/1. PROJECTS !/PC2 (Thanos)/1-CONSULTANCY/1-Μ Ε Λ Ε Τ Ε Σ * These are not top level include patterns as documentation says, and they did work as exception for files but not as exception for watchers.

I also tried putting the above rules first and last (does really order of rules have any value?)

I finally tried the following rules: /!PC1 (John)/1. PROJECTS /!PC2 (Thanos)/1-CONSULTANCY/1-Μ Ε Λ Ε Τ Ε Σ but of course they wasn’t read at all.

So, if I get it right, explicit exception rules are valid for files but watchers do not take them into account. Could that be a bug?

You could call it a bug or rather an unfortunate property of the current implementation. Any negated pattern will cause the whole tree to be watched, even though large parts of it will be ignored later on. There is work underway to change that, see here:

And yes, the order of ignore patterns does matter. They are interpreted top to bottom, first match wins. See the documentation at Ignoring Files — Syncthing documentation

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