Scenario: I have 2 computers (let’s call them A and B) syncing a multi-level folder with at least a thousand files. There’s no special push-only/receive-only rules on this sync directory – it should be bidirectional. I also have a laptop (C) that, due to drive size restrictions, mounts a few directories via Samba to computer B. Additionally, in cases where a folder isn’t registered with Samba, sftp or sshfs are used (both are interchangable).
So C has multiple folders mounted from B, most of which are also syncthing folders that are intended to be synced to another desktop in the house. When C modifies a file that exists in a samba share directory on B, the syncing works appropriately and it all acts as you’d expect. However, when a folder is mounted onto C from B via sshfs or sftp, only file creation events seem to register. Here’s an example:
- C creates a file in B’s synced folder via sftp called
test.txt
. - A gets an update from B,
test.txt
shows up. All good - C then modifies
test.txt
, and makes the file contain the stringThis is a test
. I make these changes via gedit or (insert GUI application here). - A’s file remains unchanged, a sync failure is inevitable if this file ever changes.
Expected Behavior: I would expect that this file would change akin to how ssh’ing into the server and modifying the file with vim would work. Despite the fact that C is effectively out of syncthing’s ecosystem, modifying a file on C that’s mounted as a user from B should effectively be the same as modifying the file on the computer B directly.
So the question is whether or not my expected behavior is “correct”. Is there some reason why this scenario should be causing inevitable sync errors? It’s extremely frustrating in scenarios where a “dumb” client only needs to borrow files from a computer with shared ownership for temporary reading a writing (think a Steam Deck or laptop where file “ownership” is not strong, it’s simply borrowing a file from a computer or laptop that has proper ownership.) Is this a bug? Or just a flaw due to how sftp/sshfs works?