bcpierce00 / unison

Unison file synchronizer
GNU General Public License v3.0
4.17k stars 235 forks source link

Messages and/or logic are confused about permissions/FAT #638

Open gdt opened 2 years ago

gdt commented 2 years ago

There are features that some but not filesystems have:

Of these, not having permission is deficient, and I view the others as optional.

Sync should do something rational in all cases, and it should be automatic if possible.

Currently there is some "sync involving a FAT partition" option which seems to be code for "filesystem is deficient because it does not support permissions".

To fix, do one of

For context, see #591. Note that this has not been reproduced on 2.51.5, and I'm making an exception (for a bug not reproduced on the most recent release).

tleedjarv commented 2 years ago

I think this issue is just about the GUI screen in the profile creation wizard and the explanation provided on that screen. The message should mention that this option is relevant only when syncing to FAT on non-Windows systems. (When one of the machines is Windows, this is automatically detected.)

This is the actual documentation for the "fat" preference:

          When this is set to true, Unison will use appropriate options to
          synchronize efficiently and without error a replica located on a
          FAT filesystem on a non-Windows machine: do not synchronize
          permissions (perms = 0); never use chmod (dontchmod = true);
          treat filenames as case insensitive (ignorecase = true); do not
          attempt to synchronize symbolic links (links = false); ignore
          inode number changes when detecting updates (ignoreinodenumbers
          = true). Any of these change can be overridden by explicitly
          setting the corresponding preference in the profile.

It is just a convenience option to set multiple preferences automatically because Unison currently doesn't detect filesystem type and when running on non-Windows system expects POSIX semantics (and rightly so).

gdt commented 2 years ago

OK, but is it really "FAT", or is it "deficient filesystem"? And, it seems some variety of Windows filesystems have some of those abilities, and some don't.

tleedjarv commented 2 years ago

I don't think it is "deficient filesystem". NTFS for sure supports many-many things but those features might not be available on a non-Windows system. So, deficient driver, I'd wager.

Sure, it can't be just FAT but what other widely-used fs does not support these basic features? (exFAT is also FAT, so doesn't count, in my view)

gdt commented 2 years ago

Good point about FS vs driver-and-FS.