The Samba-Bugzilla – Bug 5789
rsync trying to set times on symlinks
Last modified: 2008-09-23 20:56:54 UTC
Recently we found ourselves needing to use over 70 symbolic links [all within the documents area] on our website. These symlinks generate the annoying "rsync: failed to set permissions on "/linkpath/linkfile.php": Permission denied (13)" when I run a cron with "rsync -azPHO --rsync-path=/usr/local/rsync --links -e ssh remote.machine:/source/ target".
Interestingly, a verbose output returns the following:
set modtime of Linkfile.php to (1219952074) Thu Aug 28 15:34:34 2008
rsync: failed to set times on "/library/webserver/documents/obgynwiki/linkfile.php": Permission denied (13)
[more output snipped]
The symlinks do transfer correctly from source but rsync insists in changing the timestamps. I know that symlink timestamps can't be changed. So I've spent a week trying to prevent rsync from changing symlink timestamps by systematically editing rsync.c near lines 462 & and config.h.in near line 230 in an attempt to circumvent either preserve_times or lutines without success. I even changed the default umask to recreate the symlinks hoping the problem would go away. I've also followed the 540 relevant rsync mail list topics on this.
I'm currently using rsync 3.0.4 with the fileflags.diff & crtimes.diff patches on OS-X 10.5.5.
Computer Based Education
Albert Einstein College of Medicine
This would have been better as a mailing-list question, btw.
Edit your config.h and comments out HAVE_LUTIMES, then recompile. Maybe also complain to Apple about lutimes() not actually working.