Why does "rsync -av" always claim (incorrectly?) that it is updating write protected directories?

Wayne Davison wayned at samba.org
Sun Mar 6 17:46:47 GMT 2005

On Thu, Mar 03, 2005 at 12:32:39PM -0800, Matthew Bostrom wrote:
> 	However, "rsync -av" always claims to be updating write
> protected directories, even when they have not been changed.  I do not
> understand why.

The reason is that rsync always tries to update the time on the
directories in the transfer to match the sender, but it ignores
any error generated from that operation because some OSes don't
allow the time of a directory to be set to anything other than
"now" by a normal user.  Thus, rsync attempts to set the time on
these dirs on every run.

In 2.6.4 (not yet released) there is an option, --omit-dir-times (-O),
that turns off the preservation of directory times.  Because it is now
possible to disable this, rsync no longer hides the error from a failed
directory time-set -- it lets you know that it is failing, and you can
then choose to use -O to tell rsync that it is OK to not set the times
on the dirs (or you might notice the problem and fix it, etc.).


More information about the rsync mailing list