Hi there,
i am aware that there is no explicit 1:1 mapping of file attributes across different filesystems. The only two atributes that are usually available on filesystems are RO and A.
But syncthing could introduce an option called “Share extended file attributes” that enables this feature:
My proposal is, syncthing could provide a virtual file for every shared file, which contains serialized file properties. e.g. a file named “test.txt” initally shared from a windows machine will share a file “test.txt.st_props” along with it. This file could be placed next to the file, or a bit more user friendly, in a parallel tree which is placed next to the “.stfolder” file in the root of the share.
Content of that “test.txt.st_props” might be smth like XML:
< NtfsAttributes> < Compressed value=“true”/> < System value=“false”/> … < /NtfsAttributes>
Every client who understands NTFS attributes, could adopt these attributes. Clients not supporting these, will apply their attributes as they are do now. Now the new client can provide a more recent version of the file by adding its new < LinuxAttributes> to the test.txt.st_props, containing uid/uname/gid/gname/mode etc
When one of the two clients is offline, it could serve the attributes to newly connected clients even if they have a different file system type. If file properties on disk change, the file will get updated and distributed into the network. Even if the client is configured to not apply attributes for some speicifc share, or if they should completely ignore file date/time and attributes (new option?) they can still deliver the attributes from the test.txt.st_props.
This would allow use to use syncthing as “live-backup/migration” tool too.
What do you think about that feature?
BR, g3gg0