xattrs: Permission denied?

Wesley W. Terpstra wesley at terpstra.ca
Sat Nov 10 14:22:11 GMT 2007


On Nov 10, 2007, at 12:48 AM, Wesley W. Terpstra wrote:
> Things are not quite so simple b/c linux->linux works!?

Ahh. No. It also breaks under linux when using non-root.

> backup at pumpkin:/var/rsync$ uname -a
> Linux pumpkin 2.6.17.8ReadyNAS #1 Fri Sep 28 04:37:02 PDT 2007  
> padre GNU/Linux
> backup at pumpkin:/var/rsync$ mkdir y
> backup at pumpkin:/var/rsync$ setfattr -n user.broken -v itis y
> backup at pumpkin:/var/rsync$ chmod 0555 y
> backup at pumpkin:/var/rsync$ rsync -aX y z
> rsync: rsync_xal_set: lsetxattr("z","user.broken") failed:  
> Permission denied (13)
> rsync error: some files could not be transferred (code 23) at main.c 
> (1054) [sender=3.0.0pre5]

I've been thus far unable to figure out why this breaks.

The failure scenario is: a read-only directory with extended  
attributes copied by non-root.

If the directory has contents, it will fail to create the contents:
> rsync: mkstemp "/var/rsync/z/sub-stuff/.again.4M2ym5" failed:  
> Permission denied (13)
However, the extended attributes will copy in this case for 'sub-stuff'.

If the directory has no contents, it will fail to copy the extended  
attributes:
> rsync: rsync_xal_set: lsetxattr("sub-nostuff","user.hrm") failed:  
> Permission denied (13)

I'm still trying to find the cause. No luck so far.



More information about the rsync mailing list