Public bug reported:

As discussed at https://lists.ubuntu.com/archives/ubuntu-
devel/2018-August/040407.html ff, as of Ubuntu 18.04 an Ubuntu root
filesystem uses xattrs for storing filesystem capabilities. We should
therefore have defaults for our rsync that preserve these attributes
without needing to pass additional commandline options.

Currently the rsync -a ("archive") option is documented as preserving
symlinks (-l), permissions (-p), modification times (-t), groups (-g),
owners (-u), and special files (-D); but not hardlinks (-H), acls (-A),
or xattrs (-X).  I haven't looked into the reasoning, but I expect it's
because the first set of options can be assumed supported on a target
POSIX-ish filesystem, and the latter are not guaranteed to be supported
on all POSIX-ish filesystems (although POSIX does require hardlink
support).  On Ubuntu, and on modern Linux generally, it should be safe
to assume that any POSIX filesystem currently in use that supports Unix
permissions and special files also supports acls and xattrs.  (Linux
filesystems known to support them: ext4, xfs, jfs, zfs, btrfs.)

Without having looked closely at the implementation, I think a sensible
approach on Ubuntu would be:

 - rsync when sending should interpret '-a' to include '-A' and '-X' and send 
acls and xattrs as part of the stream.
   - if sending to a remote server that doesn't negotiate a protocol high 
enough to handle acls and xattrs, do not consider this an error.
 - rsync when receiving xattrs and acls appears to already ignore failures to 
set them, so no changes would be required for compatibility.

** Affects: rsync (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1785302

Title:
  rsync -a should imply -X

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rsync/+bug/1785302/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to