Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

Windows<->Linux attribute bingo: Set Windows/Linux default attributes instead of null #166

Closed
binwiederhier opened this issue Jul 28, 2014 · 4 comments

Comments

@binwiederhier
Copy link
Member

Syncany knows DOS attributes (Windows-only) and POSIX file permissions (Linux-only). When syncing files between Windows and Linux, the file the "other" attribute metadata is set to null by default.

Example:

  1. A file is created on Linux with POSIX perms = rw-rw-rw-
  2. The DOS attrs are set to null
  3. When a Windows client downloads the file, Windows sets some default permissions (e.g. a---)
  4. This is considered a change of attribute by Syncany's StatusOperation (from null to a---), so these changes are synced to the repo.
  5. The Linux client downloads these changes and applies the metadata.

If more clients are connected, there might be an even more complex bingo going on.
Solution: Set default attributes for the "other" OS.

@binwiederhier
Copy link
Member Author

99df0b9 should fix this, but I can't test it from a unit test. we'll need to observe two clients on Windows and Linux and see if it works.

@binwiederhier
Copy link
Member Author

Well, the attributes are now correct. But there still seems to be a problem with the last modified date. Investigating

@binwiederhier
Copy link
Member Author

File precision is different on Linux/ext3 (second) and Windows (millisecond). Arggh...

@binwiederhier
Copy link
Member Author

Fixed by ae3afda -- making last modified time stamps second based (not millisecond based)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant