rsync -a should imply -X
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
rsync (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
As discussed at https:/
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.