syncthing file scan and files that don't change timestamp, length, or permissions

I am a syncthing noob so forgive me if this is a stupid question.

I have a file that gets updated but the timestamp, length, and permissions bits are not changed. is there any feature I can use to have it run a full hash on a file and treat that as an updated file? or is there some other way syncthing can test a file to see if it has been updated?

from the doc it seems to be using sha256 hash to check for blocks of the current file vs blocks of desired version of a file, but that seems to only be applicable if the syncthing scan discovers a difference using timestamp, permissions, or file length.

I guess i could run a hash of the file and then change the timestamp if its different but then I must have scripting on all nodes which is not optimal

EDIT: yeah that could cause an update storm as each endpoint might get an “updated” file the local script would run and note the different hash update the timestamp causing all end points to believe they had an updated file. so I get this is a really bad idea.

for reference I trying to sync a veracript (VeraCrypt - Free Open source disk encryption with strong security for the Paranoid) file

thanks for your time, GF

Welcome here @genfoch01 ,

You either need to 1) tell VeraCrypt to update the timestamp (yes, this is a privacy tradeoff you need to think about) or 2) manually tell Syncthing to rescan when you want the container to be synched.

Thanks for the response. I can’t find any way to tell veracrypt to update the timestamp. so about option 2: can i tell syhcthing to rescan an individual file ? is there a way to do this (say on a Linux installation ) programmatically with a bash script?

thanks again for your time, GF

Syncthing won’t rehash the file if none of the metadata attributes have changed. You can manually touch the file to update the timestamp, though, for the same effect.

1 Like

It would be a small but useful addition though, to have a ?force=1 parameter or similar on the API endpoint: POST /rest/db/scan — Syncthing documentation

For cases where we absolutely want to make sure the data is re-hashed. And only for explicitly specified paths. (Maybe even only files?)

Settings → Preferences → Security…

1 Like

what version of veracrypt is that? I am using 1.26.7 (latest stable ) and my settings → preferences look like this

and does not show that option GF

The first screenshot looks like VeraCrypt on Linux, yours like VeraCrypt on Windows. For Windows, the option is visible in your screenshot here:

ok well I guess i need (new) glasses. I literally looked right at that and missed it completely. I am sorry for the trouble.

GF

1 Like