How to find out who changed a file?

hi,

I am currently evaluating if syncthing is the right choice for an upcoming project: there will be a central shared folder on a server somewhere, and different collaborators are invited to contribute and edit files.

my question is: is it possible to see who (which device) made the latest change to a file?

neither the ItemFinished event nor the /rest/db/file API endpoint seem to provide this information.

or am I missing s.th. here?

thanks a lot in advance!

Not really, currently. Technically, the info is encoded in the version vector, but you’d need to compare with the previous version to see who changed it last and it may still be ambiguous.

Especially with stuff like mtimes changes counting as changes.

ok. — is it s.th. that might be possible in the (foreseeable) future, you think?

I don’t think so, especially if you care about content-only changes. Whats the use case? Why do you need to know that?

It would require a protocol change, basically adding a field to carry around last-changed-by per file. It’s not impossible, but this is the first I’ve heard about it so it hasn’t been considered yet. :smile:

there will be collaborative editing of files in a shared folder. and the idea is to have a system similar to git — but without requiring contributing users to know about git / or to know how to use it. all the user does is edit and save files, which are then synced to the shared folder. a piece of software monitors that folder, and keeps track of changes (e.g. logs it to a database, creates a git commit, or similar). and for that it would be nice to know who made those changes.

But that’s only the last change, you cannot rely to capture all changes (hence all history), as some two nodes might do edits offline away from everyone else, and once they come back online it would look like the whole change was introduced by one node, where in reality it could have been introduced by both in potentially multiple occourances.

true. but this whole setup is going to be a tradeoff between ease of use and accuracy anyway. the number of users (working on the same file at the same time), as well as the frequency of activity overall is going to be relatively low. also, people are likely to be online most of the time, that’s why I’m willing to take that risk.