samba-bugs@samba.org
2008-Mar-02 22:16 UTC
DO NOT REPLY [Bug 5298] New: xattrs and acls do not work well together along with fake-super, even worse on XFS
https://bugzilla.samba.org/show_bug.cgi?id=5298 Summary: xattrs and acls do not work well together along with fake-super, even worse on XFS Product: rsync Version: 3.0.0 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P3 Component: core AssignedTo: wayned@samba.org ReportedBy: stlman@poczta.fm QAContact: rsync-qa@samba.org I may suspect there is a problem with the options: fake-super, xattrs and acls. Let me present an example. (create a test directory and enter it as root, configure rsyncd with the test module too) rm -rf source mkdir source echo data2 > source/file2 echo data1 > source/file1 chown 1000:1000 source/file1 setfattr -n user.DOSATTRIB -v "0x30783031" source/file1 setfacl -m g:wheel:rw- source/file1 rsync $OPTS -av source/ backup::test/dest1 rsync $OPTS -av --link-dest ../dest1 source/ backup::test/dest2 ------------------------------------------- For OPTS="" ../test/dest1: total 16 -rw-rw-r-- 2 backup nobody 6 Mar 2 23:00 file1 -rw-r--r-- 2 backup nobody 6 Mar 2 23:00 file2 ../test/dest2: total 16 -rw-rw-r-- 2 backup nobody 6 Mar 2 23:00 file1 -rw-r--r-- 2 backup nobody 6 Mar 2 23:00 file2 I am not sure file1 should get 664 but this may be the problem of stat(2). The number of hard links is OK. # file: ../test/dest1/file1 user.rsync.%stat="100664 0,0 1000:1000" # file: ../test/dest1/file2 user.rsync.%stat="100644 0,0 0:0" # file: ../test/dest2/file1 user.rsync.%stat="100664 0,0 1000:1000" # file: ../test/dest2/file2 user.rsync.%stat="100644 0,0 0:0" ------------------------------------------- For OPTS=--acls ls is the same as above and getfattr # file: ../test/dest1/file1 user.rsync.%aacl=0sgAAAAAQAAAAGAAAAgAAAAAoAAAAGAAAA user.rsync.%stat="100664 0,0 1000:1000" # file: ../test/dest1/file2 user.rsync.%stat="100644 0,0 0:0" # file: ../test/dest2/file1 user.rsync.%aacl=0sgAAAAAQAAAAGAAAAgAAAAAoAAAAGAAAA user.rsync.%stat="100664 0,0 1000:1000" # file: ../test/dest2/file2 user.rsync.%stat="100644 0,0 0:0" Seems OK. ------------------------------------------- For OPTS=--xattrs # file: ../test/dest1/file1 user.DOSATTRIB="0x01" user.rsync.%stat="100664 0,0 1000:1000" # file: ../test/dest1/file2 user.rsync.%stat="100644 0,0 0:0" # file: ../test/dest2/file1 user.DOSATTRIB="0x01" user.rsync.%stat="100664 0,0 1000:1000" # file: ../test/dest2/file2 user.rsync.%stat="100644 0,0 0:0" ../test/dest1: total 16 -rw-rw-r-- 2 backup nobody 6 Mar 2 23:05 file1 -rw-r--r-- 2 backup nobody 6 Mar 2 23:05 file2 ../test/dest2: total 16 -rw-rw-r-- 2 backup nobody 6 Mar 2 23:05 file1 -rw-r--r-- 2 backup nobody 6 Mar 2 23:05 file2 Still OK. Number of links is two. user.DOSATTRIB is preserved. ------------------------------------------- For OPTS="-AX" (the manual does not forbid this) # file: ../test/dest1/file1 user.DOSATTRIB="0x01" user.rsync.%aacl=0sgAAAAAQAAAAGAAAAgAAAAAoAAAAGAAAA user.rsync.%stat="100664 0,0 1000:1000" # file: ../test/dest1/file2 user.rsync.%stat="100644 0,0 0:0" # file: ../test/dest2/file1 user.DOSATTRIB="0x01" user.rsync.%stat="100664 0,0 1000:1000" # file: ../test/dest2/file2 user.rsync.%stat="100644 0,0 0:0" ../test/dest1: total 16 -rw-rw-r-- 1 backup nobody 6 Mar 2 23:06 file1 -rw-r--r-- 2 backup nobody 6 Mar 2 23:06 file2 ../test/dest2: total 16 -rw-rw-r-- 1 backup nobody 6 Mar 2 23:06 file1 -rw-r--r-- 2 backup nobody 6 Mar 2 23:06 file2 Well this is really odd. file1 gets copied twice each time with different xattrs! ------------------------------------------- What makes the game even more fascinating is the XFS filesystem which stores ACLs as trusted.SGI_ACL_FILE extended attribute and generates system.posix_acl_access on the fly. One might think that this means that --xattrs can be used without --acls and XFS will be preserved. That's true but for some reason rsync copies files with trusted.SGI_ACL_FILE twice instead of linking it. Even when the values are the same. # file: ../test/dest1/file1 user.DOSATTRIB="0x01" user.rsync.%stat="100664 0,0 1000:1000" user.rsync.trusted.SGI_ACL_FILE=0sAAAABQAAAAH/////AAYAAAAAAAT/////AAQUCAAAAAgAAAAKAAYAAAAAABD/////AAZJRgAAACD/////AAQAAA= # file: ../test/dest1/file2 user.rsync.%stat="100644 0,0 0:0" # file: ../test/dest2/file1 user.DOSATTRIB="0x01" user.rsync.%stat="100664 0,0 1000:1000" user.rsync.trusted.SGI_ACL_FILE=0sAAAABQAAAAH/////AAYAAAAAAAT/////AAQUCAAAAAgAAAAKAAYAAAAAABD/////AAZJRgAAACD/////AAQAAA= # file: ../test/dest2/file2 user.rsync.%stat="100644 0,0 0:0" ../test/dest1: total 16 -rw-rw-r-- 1 backup nobody 6 Mar 2 23:09 file1 -rw-r--r-- 2 backup nobody 6 Mar 2 23:09 file2 ../test/dest2: total 16 -rw-rw-r-- 1 backup nobody 6 Mar 2 23:09 file1 -rw-r--r-- 2 backup nobody 6 Mar 2 23:09 file2 -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
samba-bugs@samba.org
2008-Mar-08 00:21 UTC
DO NOT REPLY [Bug 5298] xattrs and acls do not work well together along with fake-super, even worse on XFS
https://bugzilla.samba.org/show_bug.cgi?id=5298 ------- Comment #1 from wayned@samba.org 2008-03-07 18:21 CST ------- Created an attachment (id=3170) --> (https://bugzilla.samba.org/attachment.cgi?id=3170&action=view) Fix interaction between --fake-super and --link-dest w/--xattrs This patch fixes a couple problems with the --fake-super interaction between the xattr code, including the use of fake-xattr ACLs, and non-user namespace xattrs. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
samba-bugs@samba.org
2008-Mar-08 00:26 UTC
DO NOT REPLY [Bug 5298] problem with --fake-super, --link-dest, and --xattrs
https://bugzilla.samba.org/show_bug.cgi?id=5298 wayned@samba.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED Summary|xattrs and acls do not work |problem with --fake-super, - |well together along with |-link-dest, and --xattrs |fake-super, even worse on | |XFS | ------- Comment #2 from wayned@samba.org 2008-03-07 18:26 CST ------- Thanks for pointing this out! This should be fixed in the latest git repository version and the latest nightly tar file. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.