how to ignore watching root folder?

Hi there, I try to sync few files in a folder, where all other files and folders have a root ownership. I successfully ignored all unnecessary files.

User Group   Files & Folders
---------------------------------------------
1000  1000   folder_synced
root  root   folder_to_ignore-troubled-one
root  1000   file_synced.json
root  root   file_ignored.json
root  root   file_ignored.json
root  root   file_ignored.json
root  root   file_ignored.json
1000  1000   .stfolder
1000  1000   .stignore

.stignore file:

**
!folder_synced
!file_synced.json

But when it comes to a folder with root ownership, despite I write ** in .stignore, it still tries to watch it for changes and brings permission denied error.

What can I do to resolve the trouble?

Doe you study the documents about?

https://docs.syncthing.net/users/ignoring.html?highlight=ignore%20list

1 Like

ahh, found it Thanks!!

Include patterns (that begin with !) cause Syncthing to traverse the entire directory tree regardless of other ignore patterns. If the watcher is enabled, the entire directory tree will be watched as well.

But it actually seems like a bug, not a feature, isn’t it?

Resolved the trouble!

I copied all the names of existing files, however, it feels like a kludge, not a proper resolution ):

I’m not sure this will make any difference when it comes to the file watcher due to using ! negated patterns, but the order above is wrong. You need to put ! before *, i.e.

!folder_synced
!file_synced.json
*

There’s also no need for the double ** in this case.

1 Like

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