3

What options of Rsync can I reliably use/ how/ combine to either:

  • RELIABLY TRANSFER "working" even if "limited set" of Permissions/ ACLs reliably & without conflict between the Gray area of Cygwin Windows/ NTFS & *Nix / Perms etc
    OR

  • Flush clean / have RSync totally avoid Permissions / ACL issues if I cant do the above?

I've read close to 50 tabs and windows on what to do around this from the last decade or so.

At how to deal with it seems to change based on where & who you are asking and what version of Rsync (time & variation/ alternative code base) is being talked about.

  • Rsync variations under Windows
    • (Several *Nix & Windows: Cygwin variations, CwRsync, Delta Copy/ Syncrify/ Synaman, GRsync, RsyncBackup, Rsync.exe pkg, Rclone, AcroSync, YInterSync)

Options to choose:

The answer on how to execute RSync for this specific scenario I've got from this QnA;

But after gathering all the "knowledge" on RSync around Cygwin, NTFS, Permissions & ACLs etc, I am not sure what variation does what to make a decision on how to proceed.

It turns out that to keep your Windows permissions in check, a simple chmod flag is required.
—chmod=ugo=rwX

Rsync Options (some..)

 -p, --perms                 preserve permissions
 -E, --executability         preserve the file's executability
     --chmod=CHMOD           affect file and/or directory permissions

 -A, --acls                  preserve ACLs (implies --perms)
 -o, --owner                 preserve owner (super-user only)
 -g, --group                 preserve group
     --devices               preserve device files (super-user only)
     --specials              preserve special files
 -D                          same as --devices --specials


/etc/fstab (addition of noacl)


# /etc/fstab
#
#    This file is read once by the first process in a Cygwin process tree.
#    To pick up changes, restart all Cygwin processes.  For a description
#    see https://cygwin.com/cygwin-ug-net/using.html#mount-table

# This is default anyway:
# none /cygdrive cygdrive binary,posix=0,user 0 0
none /cygdrive cygdrive binary,posix=0,user,noacl 0 0

8
  • @roaima - Not asking for documentation but clarity between various options / permissions/ ACLs one can choose here. Let me rephrase and add
    – Alex S
    Oct 17 '19 at 11:54
  • @roaima - Updated: Basically best case variation of TRANSFER or NONE? How?
    – Alex S
    Oct 17 '19 at 12:01
  • Not planning to transfer to Unix, But that "translation" between Win & *Unix is an issue, as Rsync reads from Win & Rewrites to Win in the above operation. So during "translation" how much can it CARRY across in a Kosher fashion?
    – Alex S
    Oct 17 '19 at 12:04
  • There is no problem with translating between UNIX and MS-WIN, since all modern UNIX systems use ACLs based on the NTFS concept. Just avoid Linux...
    – schily
    Nov 5 '19 at 16:51
  • 1
    Linux is not a modern OS with respect to ACL support :-( there is a ACE (NTFS ACLs) implementation for Linux but this is not supported by distros and it uses an unusual own local library interface definition that makes it hard to port software that already works on other platforms (like star does). All modern OS (Apple, AIX, FreeBSD, Solaris) implement ACEs since this is standardized in NFSv4. In general, the GNU people are ignoring ACLscompletely. GNU tar only supports the outdated ACLs on Linux, but no ACLs on other OS. SAMBA tries a bad translate, Oracle has a SAMBA patch for native ACEs
    – schily
    Nov 6 '19 at 11:44
4

I've been looking at this over the last several days, and after reading lots of references and actually trying out various combinations of flags, I don't think that rsync will carry Windows ACLs.

rsync -aX src/ dst/
rsync: extended attributes are not supported on this client

I found this recommendation to remount the Cygwin view of the local NTFS drives with noacl, but I couldn't get that to work usefully for me. Another suggestion to use --chmod=ugo=rwX didn't help at all.

It seems that for this particular use case you'll need to use something like ROBOCOPY /SEC instead of rsync.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.