Not all files getting scannned & synced

I have eight files in a folder and only 3 of them are getting scanned/sycned. They are all epub files.

syncthing-windows-amd64-v1.13.1 => binary used.

Did you try pressing the rescan button? I suspect the file watcher might not be working for some reason? But I’d expect you see that in the logs.

yes, multiple times. I restarted the PC and waited for like 15+ minutes.

You should enable scanner logging facility, start capturing the logs, press the rescan button and then paste the logs.

1 Like

sure, how to enable that Scan logger?

https://docs.syncthing.net/dev/debugging.html?highlight=sttrace#environment-variables

1 Like

You can also control these via the UI in the hamburger menu → Log, but I prefer the old way.

1 Like

Such errors should appear in the web UI as “failed items”. Can you post the related lines you found in the log please.

Here you go :
LOG-of-not-all-files-getting-scannned-synced.txt (4.0 KB)

Thanks. The problem is the user has permissions to stat the file (that’s where I expected the error to occur), but does not have permissions to open the file. And apparently the latter doesn’t make it to the UI. Fix: lib/scanner: Pass on errors while hashing by imsodin · Pull Request #7380 · syncthing/syncthing · GitHub

2 Likes

I have a similar problem on an Android device, although the logs look little bit different.

to hash: xxx File{Name:"xxx", Sequence:0, Permissions:0660, ModTime:2021-01-24 10:42:55.57532183 +0000 UTC, Version:{[{TX7YPBI 1613674468}]}, VersionHash:, Length:3558124, Deleted:false, Invalid:false, LocalFlags:0x0, NoPermissions:true, BlockSize:131072, Blocks:[], BlocksHash:}
open: open /sdcard/xxx: permission denied
hash error: xxx open /sdcard/xxx: permission denied

Is this the same problem or something else? In my case, the GUI also shows no errors, but what is strange is that Syncthing is running as root, and it still gets denied access to those files.

Yep, same thing. The android/root/permission/… issues isn’t related to this topic though, so lets not discuss that here.