The Samba-Bugzilla – Bug 5190
rsyncd can't unlink dir structure when only the group has write permission
Last modified: 2008-02-04 14:46:16 UTC
The command: rsync -va --delete-after --delete-excluded -F --password-file=... --chmod=u=rX,g=rwX,o-rwx /home/cassus/ rsync://cassusbackup@kitty/cassusbackup/
The structure on the server is: .../0/qwe/ewq
dr-xrwx--- 163 cassus backup 12288 2008-01-13 03:37 0
-r--rw---- 1 cassus backup 0 2008-01-13 03:20 ewq
dr-xrwx--- 2 cassus backup 4096 2008-01-13 03:20 qwe
the "0" folder is the module root.
interesting part of output:
rsync: delete_file: unlink "/qwe/ewq" (in cassusbackup) failed: Permission denied (13)
rsync error: some files could not be transferred (code 23) at main.c(977) [sender=2.6.9]
So rsyncd couldn't delete the ewq file from the qwe dir. However, putting new files into that directory works flawlessly. Also if only the ewq file was deleted, so the qwe dir is not to be deleted by the sync, all works. The problem onnly occures when rsync needs to delete a whole hierarchy.
Created attachment 3115 [details]
Force user-write on files before deltion.
Here's one way to fix the problem. Am considering if I think this needs further refinement.
The latest dev source has an optimized version of the proposed patch, which fixes this problem.