I've found a(nother) bug with the xattr code:
kiwiw:~/x terpstra$ uname -a
Darwin kiwiw.lan 8.10.0 Darwin Kernel Version 8.10.0: Wed May 23
16:50:59 PDT 2007; root:xnu-792.21.3~1/RELEASE_PPC Power Macintosh
powerpc
kiwiw:~/x terpstra$ echo test > bar
kiwiw:~/x terpstra$ xattr --set broken demo bar
kiwiw:~/x terpstra$ chmod 0444 bar
kiwiw:~/x terpstra$ rsync-3.0 -aHAXSx bar pumpkin::staging/tmp/
rsync: rsync_xal_set: lsetxattr(".bar.E055QA","user.broken")
failed:
Permission denied (13)
rsync: rsync_xal_set: lsetxattr
(".bar.E055QA","user.com.apple.crtime96") failed: Permission
denied (13)
rsync error: some files could not be transferred (code 23) at main.c
(1053) [sender=3.0.0pre2]
kiwiw:~/x terpstra$ mkdir y
kiwiw:~/x terpstra$ chmod 0555 y
kiwiw:~/x terpstra$ rsync-3.0 -aHAXSx y pumpkin::staging/tmp/
rsync: rsync_xal_set:
lsetxattr("y","user.com.apple.crtime96")
failed: Permission denied (13)
rsync: rsync_xal_clear: lremovexattr("y","user.rsync.%stat")
failed:
Permission denied (13)
rsync error: some files could not be transferred (code 23) at main.c
(1053) [sender=3.0.0pre2]
I'm not sure when this bug was introduced (this wasn't a problem
before 3.0), but the patch is obvious.
You cannot write extended attributes to a read-only file (or
directory). Rsync tried to do this (with fake-super enabled!) for all
transmitted xattrs and also with the %stat fake-super attribute.
Upgraded to pre5. On Oct 21, 2007, at 5:35 PM, Wesley W. Terpstra wrote:> I've found a(nother) bug with the xattr code: > kiwiw:~/x terpstra$ uname -a > Darwin kiwiw.lan 8.10.0 Darwin Kernel Version 8.10.0: Wed May 23 > 16:50:59 PDT 2007; root:xnu-792.21.3~1/RELEASE_PPC Power Macintosh > powerpc > kiwiw:~/x terpstra$ echo test > bar > kiwiw:~/x terpstra$ xattr --set broken demo bar > kiwiw:~/x terpstra$ chmod 0444 bar > kiwiw:~/x terpstra$ rsync-3.0 -aHAXSx bar pumpkin::staging/tmp/ > rsync: rsync_xal_set: lsetxattr(".bar.E055QA","user.broken") > failed: Permission denied (13) > rsync: rsync_xal_set: lsetxattr > (".bar.E055QA","user.com.apple.crtime96") failed: Permission denied > (13) > rsync error: some files could not be transferred (code 23) at main.c > (1053) [sender=3.0.0pre2]This problem is fixed.> kiwiw:~/x terpstra$ mkdir y > kiwiw:~/x terpstra$ chmod 0555 y > kiwiw:~/x terpstra$ rsync-3.0 -aHAXSx y pumpkin::staging/tmp/ > rsync: rsync_xal_set: lsetxattr("y","user.com.apple.crtime96") > failed: Permission denied (13) > rsync: rsync_xal_clear: lremovexattr("y","user.rsync.%stat") > failed: Permission denied (13) > rsync error: some files could not be transferred (code 23) at main.c > (1053) [sender=3.0.0pre2]This problem remains.
Things are not quite so simple b/c linux->linux works!? This fails on osx:> kiwiw:~/foo terpstra$ uname -a > Darwin kiwiw.lan 8.10.0 Darwin Kernel Version 8.10.0: Wed May 23 > 16:50:59 PDT 2007; root:xnu-792.21.3~1/RELEASE_PPC Power Macintosh > powerpc > kiwiw:~/foo terpstra$ mkdir y > kiwiw:~/foo terpstra$ xattr --set broken "this is" y > kiwiw:~/foo terpstra$ chmod 0555 y > kiwiw:~/foo terpstra$ ~/src/rsync-3.0.0pre5/rsync -aX y z > rsync: rsync_xal_set: lsetxattr("z","broken") failed: Permission > denied (13) > rsync error: some files could not be transferred (code 23) at main.c > (1054) [sender=3.0.0pre5]But works on linux:> pumpkin:/c/debian/x# rmdir y z > pumpkin:/c/debian/x# mkdir y > pumpkin:/c/debian/x# setfattr -n user.broken -v "this is" y > pumpkin:/c/debian/x# chmod 0555 y > pumpkin:/c/debian/x# ../root/rsync-3.0.0pre5/rsync -aX y z... and yet fails when going from osx->linux:> kiwiw:~/foo terpstra$ ~/src/rsync-3.0.0pre5/rsync -aX y > pumpkin::staging/tmp/ > rsync: rsync_xal_set: lsetxattr("y","user.broken") failed: > Permission denied (13) > rsync: rsync_xal_set: lsetxattr("y","user.com.apple.crtime96") > failed: Permission denied (13) > rsync: rsync_xal_clear: lremovexattr("y","user.rsync.%stat") > failed: Permission denied (13) > rsync error: some files could not be transferred (code 23) at main.c > (1054) [sender=3.0.0pre5]... and also fails from linux->osx:> pumpkin:/c/debian/x# ../root/rsync-3.0.0pre5/rsync --rsync-path / > usr/bin/rsync-3.0 -aX y terpstra@kiwiw:~/ > rsync: rsync_xal_set: lsetxattr("y","broken") failed: Permission > denied (13) > rsync error: some files could not be transferred (code 23) at main.c > (1054) [sender=3.0.0pre5]All cases work when the directory is 0755.