Bug 2706 - An option to transfer POSIX ACLs
Summary: An option to transfer POSIX ACLs
Status: RESOLVED FIXED
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 2.6.4
Hardware: All Linux
: P3 enhancement (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-12 18:16 UTC by Matt McCutchen
Modified: 2007-09-22 22:04 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt McCutchen 2005-05-12 18:16:29 UTC
I'd like an option "--acl" that transfers ACLs if both filesystems support them.

POSIX ACLs are improved file permissions.  ACLs can grant access to users and
groups other than the owners of a file, and they can specify default permissions
for new files in a folder that take the place of the `umask'.

This option should be a matter of getting the ACL on one system using
"acl_get_file" and "acl_copy_ext", sending it to the other system, and applying
it using "acl_copy_int" and "acl_set_file".  It would take a little more work to
preserve IDs by name and make this play nicely with "--numeric-ids".  The "-a"
option should probably include "--acl".
Comment 1 Wayne Davison 2005-05-16 10:01:46 UTC
There is the acls.diff file in the patches directory that implements the --acls
option.  Feel free to give it a try.  In the future, support for ACLs will
hopefully make it into the main release.
Comment 2 Sven Strickroth 2005-06-04 19:35:26 UTC
in 2.6.5 the acls.diff does not work. It seems to apply cleanly, but rsync 
doesn't compile:

In file included from rsync.h:679,
                 from rsync.c:23:
proto.h:270: error: syntax error before "UNUSED"
proto.h:366: error: syntax error before '(' token
proto.h:366: error: conflicting types for 'UNUSED'
proto.h:366: error: previous declaration of 'UNUSED' was here
proto.h:366: error: conflicting types for 'UNUSED'
proto.h:366: error: previous declaration of 'UNUSED' was here
proto.h:366: error: syntax error before ')' token
proto.h:367: error: syntax error before '(' token
proto.h:367: error: conflicting types for 'UNUSED'
... etc.
Comment 3 Wayne Davison 2005-06-05 14:43:02 UTC
The acls.diff patch included with 2.6.5 builds fine.  I assume you neglected to
use the -p0 option when using patch.  The two new sysacls.[ch] files must be put
in the lib dir for things to build correctly (including the building of the
proto.h file), and failing to use -p0 causes all the new files to be extracted
to the current directory.
Comment 4 Matt McCutchen 2007-09-22 22:04:47 UTC
Since the ACL support has been added to the main version of rsync in CVS, I consider this fixed.