Bug 8183 - rsync 3.0.8 can't modify read-only directories created on the same run
Summary: rsync 3.0.8 can't modify read-only directories created on the same run
Status: RESOLVED FIXED
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.1.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-29 15:48 UTC by Kierson Anderson
Modified: 2011-05-30 15:51 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kierson Anderson 2011-05-29 15:48:41 UTC
I have a directory tree that is composed of read-only directories.  Prior to 3.0.8, it was possible to create backup copies of the directory tree using rsync -a, but with 3.0.8, I'm getting permission denied errors from rsync as it tries to create subdirectories and temporary files.  There is no problem if the read-only directory already exists in the destination tree, even if it is read-only.  As a consequence, multiple runs of rsync eventually succeed in copying the entire tree.  The following tcsh interaction (on a 64-bit Fedora 13 system) demonstrates the problem.  I have not tried to reproduce the problem on any other operating system.

% mkdir -p /tmp/t1/t2/t3
% touch /tmp/t1/t2/t3/t4
% chmod -R 550 /tmp/t1
% rsync -a /tmp/t1/ /tmp/t1a
rsync: recv_generator: mkdir "/tmp/t1a/t2" failed: Permission denied (13)
*** Skipping any contents from this failed directory ***
rsync error: some files/attrs were not transferred (see previous errors) (code >
% rsync -a /tmp/t1/ /tmp/t1a
rsync: recv_generator: mkdir "/tmp/t1a/t2/t3" failed: Permission denied (13)
*** Skipping any contents from this failed directory ***
rsync error: some files/attrs were not transferred (see previous errors) (code >
% rsync -a /tmp/t1/ /tmp/t1a
rsync: mkstemp "/tmp/t1a/t2/t3/.t4.kYCSKH" failed: Permission denied (13)
rsync error: some files/attrs were not transferred (see previous errors) (code >
% rsync -a /tmp/t1/ /tmp/t1a
%

Each run creates a bit more of the destination tree until the entire tree is finally copied, and the last run gives no errors.
Comment 1 Wayne Davison 2011-05-30 15:51:37 UTC
I've committed a fix for this to git.  You can see it here:

http://gitweb.samba.org/?p=rsync.git