Can't ignore root owned file

I have a file sasl_passwd in a directory shared by syncthing. It’s owned by root and has 0600 permissions, i.e. it can only be read by root.

I have sasl_passwd in the .stignore file for the synchronized directory but it still shows up as an ‘out of sync’ item on every system.

Is syncthing unable to ignore a file that it can’t read? I had hoped that telling syncthing to ignore the file would really make it ignore it but apparently not.

Am I missing something very obvious or is this a bug/feature?

Post the .stignore file?

sasl_passwd

Super straightforward. My read of Ignoring Files — Syncthing documentation is that the _ character is treated literally and does not need to be escaped. I cannot explain that behavior; I thought that Syncthing would really ignore files that matched the pattern. Unless the pattern wasn’t in place, and it tried to sync it previously, and is now in place? I’m reaching here.

Yes, I think you have the explanation there. The .stignore file must be in place with the filename to ignore before setting up the directory to share. The trouble is that makes it very difficult to ignore a file that wasn’t ignored before.

Yeah it’s a bit annoying once a file has escaped containment. What I sometimes do is move it out of the synced folder, let the delete propagate, add the ignore pattern, then move it back.