Bug 5939 - rsync: delete of stat xattr failed for ... (in backup): Operation not permitted (1)
rsync: delete of stat xattr failed for ... (in backup): Operation not permitt...
Status: RESOLVED FIXED
Product: rsync
Classification: Unclassified
Component: core
3.0.4
Other Linux
: P3 normal
: ---
Assigned To: Wayne Davison
Rsync QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-04 12:19 UTC by Paul Cullum
Modified: 2011-02-22 09:10 UTC (History)
1 user (show)

See Also:


Attachments
Patch to ignore "delete of stat xattr" failures on symlinks (633 bytes, patch)
2009-07-14 22:03 UTC, William Throwe
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Cullum 2008-12-04 12:19:23 UTC
I've been having a problem rsync (3.0.3 and I also tried 3.0.5pre2).  I'm rsyncing to an rsync daemon with "fake super = yes" in the rsyncd.conf file and I get many errors like this:

This ONLY happens to symlinks.  Most symlinks are fine. Most of these are either broken symlinks or symlinks that happen to have a different owner than what they link to.  I thought this might be the root of the problem so I created a small test for new symlinks with these attributes but my test worked without a problem.  Also one of these errors is for a valid symlink that is owned by the same owner as what it points to and I've been unable to do anything to fix the error.

Is there something I can do to increase the logging for the daemon so that I can't figure out exactly what the problem is?

And... yes the file system was mounted with user_xattr.  "fake super" seems to work just fine for me with the exception of these errors.

2008/12/04 13:53:15 [1818] rsync: delete of stat xattr failed for "home/jtest/public_html" (in backup): Operation not permitted (1)
2008/12/04 13:53:15 [1818] rsync: delete of stat xattr failed for "home/testuser/IDrive" (in backup): Operation not permitted (1)
2008/12/04 13:53:15 [1818] rsync: delete of stat xattr failed for "home/testuser/KDrive" (in backup): Operation not permitted (1)
2008/12/04 13:53:15 [1818] rsync: delete of stat xattr failed for "home/testuser/test" (in backup): Operation not permitted (1)
2008/12/04 13:53:15 [1818] rsync: delete of stat xattr failed for "home/testuser/daycare" (in backup): Operation not permitted (1)
2008/12/04 13:53:15 [1818] rsync: delete of stat xattr failed for "home/testuser/hosts" (in backup): Operation not permitted (1)
2008/12/04 13:53:15 [1818] rsync: delete of stat xattr failed for "home/testuser/house.example.com" (in backup): Operation not permitted (1)
2008/12/04 13:53:15 [1818] rsync: delete of stat xattr failed for "home/testuser/public_html" (in backup): Operation not permitted (1)
2008/12/04 13:53:15 [1818] rsync: delete of stat xattr failed for "home/testuser/.kde/cache-vex.example.com" (in backup): Operation not permitted (1)
2008/12/04 13:53:15 [1818] rsync: delete of stat xattr failed for "home/testuser/.kde/socket-vex.example.com" (in backup): Operation not permitted (1)
2008/12/04 13:53:15 [1818] rsync: delete of stat xattr failed for "home/testuser/.kde/tmp-vex.example.com" (in backup): Operation not permitted (1)
2008/12/04 13:53:15 [1818] rsync: delete of stat xattr failed for "home/testuser/amazon/startupscript.sh" (in backup): Operation not permitted (1)
2008/12/04 13:53:18 [1818] rsync: delete of stat xattr failed for "var/www/hosts/house.example.com" (in backup): Operation not permitted (1)
2008/12/04 13:53:18 [1818] rsync: delete of stat xattr failed for "var/www/hosts/mail.example.com" (in backup): Operation not permitted (1)
2008/12/04 13:53:18 [1818] rsync: delete of stat xattr failed for "var/www/hosts/example.com/docs" (in backup): Operation not permitted (1)
2008/12/04 13:53:18 [1818] rsync: delete of stat xattr failed for "var/www/hosts/house.example.com/docs/mandriva-one-2007-kde1.iso" (in backup): Operation not permitted (1)
2008/12/04 13:53:18 [1818] rsync: delete of stat xattr failed for "var/www/hosts/mail.example.com2/docs/images" (in backup): Operation not permitted (1)
2008/12/04 13:53:18 [1818] rsync: delete of stat xattr failed for "var/www/hosts/test2.example.com/docs/preschool" (in backup): Operation not permitted (1)
2008/12/04 14:06:22 [1842] rsync: delete of stat xattr failed for "home/testuser/IDrive" (in backup): Operation not permitted (1)
2008/12/04 14:06:22 [1842] rsync: delete of stat xattr failed for "home/testuser/KDrive" (in backup): Operation not permitted (1)
2008/12/04 14:06:23 [1842] rsync: delete of stat xattr failed for "home/testuser/amazon/startupscript.sh" (in backup): Operation not permitted (1)
2008/12/04 14:06:26 [1842] rsync: delete of stat xattr failed for "var/www/hosts/mail.example.com2/docs/images" (in backup): Operation not permitted (1)
2008/12/04 14:10:14 [1847] rsync: delete of stat xattr failed for "home/testuser/amazon/startupscript.sh" (in backup): Operation not permitted (1)
2008/12/04 14:12:05 [1852] rsync: delete of stat xattr failed for "home/testuser/amazon/startupscript.sh" (in backup): Operation not permitted (1)
2008/12/04 15:43:36 [1891] rsync: delete of stat xattr failed for "home/testuser/amazon/startupscript.sh" (in backup): Operation not permitted (1)
2008/12/04 15:45:07 [1896] rsync: delete of stat xattr failed for "home/testuser/amazon/startupscript.sh" (in backup): Operation not permitted (1)
2008/12/04 15:45:18 [1901] rsync: delete of stat xattr failed for "home/testuser/amazon/startupscript.sh" (in backup): Operation not permitted (1)
2008/12/04 15:46:41 [1906] rsync: delete of stat xattr failed for "home/testuser/amazon/startupscript.sh" (in backup): Operation not permitted (1)
Comment 1 Paul Cullum 2008-12-04 13:52:21 UTC
Well I've managed to increase verbosity a little bit and tried rsyncing only one of the symlinks that was having this problem:

...
recv_file_name(home/testuser/amazon/startupscript.sh)
received 1 names
[generator] flist start=7, used=1, low=0, high=0
[generator] i=7 4 home/testuser/amazon/startupscript.sh mode=0120777 len=35 uid=1000 gid=1000 flags=0
recv_file_list done
recv_generator(home/testuser/amazon,6)
send_files(6, /home/testuser/amazon)
recv_generator(home/testuser/amazon/startupscript.sh,7)
rsync: delete of stat xattr failed for "home/testuser/amazon/startupscript.sh" (in backup): Operation not permitted (1)
set modtime of home/testuser/amazon/startupscript.sh to (1228399898) Thu Dec  4 14:11:38 2008
set uid of home/testuser/amazon/startupscript.sh from 0 to 1000
set gid of home/testuser/amazon/startupscript.sh from 0 to 1000
home/testuser/amazon/startupscript.sh
send_files(7, /home/testuser/amazon/startupscript.sh)
touch_up_dirs: home/testuser (1)
generate_files phase=1
send_files phase=1
Comment 2 William Throwe 2009-07-14 21:59:17 UTC
I also see this bug (using --fake-super), including in a nightly build last week.  I'm actually getting this error on all symlinks I tested (tried broken and working to both a file and a directory, didn't try different owners).  I think this is because I'm using an ext3 file system, and it doesn't support xattrs on symlinks.

I notice that in the code, usually when an xattr change is attempted, if it fails on a symlink with EPERM, the failure is ignored, but that this check is not performed for the "delete of stat xattr" change.  Adding a check makes the warnings disappear.  I'm not sure if there is a reason for the absence of the check, but it seems to cause errors even when there should not be any xattrs set on the link (because the get_stat_xattr function claims there is an xattr there when it can't read the xattrs).

Anyway, I've written a simple patch adding the check for EPERM on a symlink.
Comment 3 William Throwe 2009-07-14 22:03:09 UTC
Created attachment 4418 [details]
Patch to ignore "delete of stat xattr" failures on symlinks
Comment 4 Wayne Davison 2011-02-22 09:10:31 UTC
In the latest code, xattrs are turned off for symlinks on Linux.