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.
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?
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.