Bug 743479 - rsync over ssh fails to copy write-protected directories
Summary: rsync over ssh fails to copy write-protected directories
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rsync
Version: 14
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Michal Luscon
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-05 03:49 UTC by Andrei Gaponenko
Modified: 2011-11-25 23:28 UTC (History)
4 users (show)

Fixed In Version: rsync-3.0.8-2.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-11 01:23:50 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Fix unwritable directory issue due to misordered chmod call. (1.13 KB, patch)
2011-10-20 13:48 UTC, Michal Luscon
no flags Details | Diff

Description Andrei Gaponenko 2011-10-05 03:49:34 UTC
"rsync -av src remote:dst" fails to transfer files in write-protected subdirectories of src, leading to incomplete backups.  Here is an example:

mkdir src
touch src/aaa
rsync -av src otherhost:.

The above gives:

rsync: mkstemp "/home/f14/andr/ttt/.aaa.0rbp2o" failed: Permission denied (13)

sent 105 bytes  received 35 bytes  93.33 bytes/sec
total size is 0  speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1052) [sender=3.0.8]

Andrei

Comment 1 Andrei Gaponenko 2011-10-05 03:51:00 UTC
(In reply to comment #0)  Added forgotten "chmod" in the example

> "rsync -av src remote:dst" fails to transfer files in write-protected
> subdirectories of src, leading to incomplete backups.  Here is an example:
> 
> mkdir src
> touch src/aaa

chmod a-w src

> rsync -av src otherhost:.
> 
> The above gives:
> 
> rsync: mkstemp "/home/f14/andr/ttt/.aaa.0rbp2o" failed: Permission denied (13)
> 
> sent 105 bytes  received 35 bytes  93.33 bytes/sec
> total size is 0  speedup is 0.00
> rsync error: some files/attrs were not transferred (see previous errors) (code
> 23) at main.c(1052) [sender=3.0.8]
> 
> Andrei

Comment 2 Michal Luscon 2011-10-20 13:48:18 UTC
Created attachment 529280 [details]
Fix unwritable directory issue due to misordered chmod call.

Based on upstream commit ba35ba06c9964d67fd7712f1b103e6d527f30c46
Author: Wayne Davison <wayned>
Date:   Mon May 30 08:24:27 2011 -0700

Comment 3 Fedora Update System 2011-10-31 14:44:46 UTC
rsync-3.0.8-2.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/rsync-3.0.8-2.fc15

Comment 4 Fedora Update System 2011-10-31 14:45:00 UTC
rsync-3.0.8-2.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/rsync-3.0.8-2.fc14

Comment 5 Fedora Update System 2011-10-31 14:45:14 UTC
rsync-3.0.8-2.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/rsync-3.0.8-2.fc16

Comment 6 Fedora Update System 2011-10-31 21:23:37 UTC
Package rsync-3.0.8-2.fc14:
* should fix your issue,
* was pushed to the Fedora 14 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing rsync-3.0.8-2.fc14'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-15141
then log in and leave karma (feedback).

Comment 7 Andrei Gaponenko 2011-11-02 15:23:57 UTC
Hi, 

rsync-3.0.8-2.fc14 fixes the problem.
Thank you!  Karma's been left.

Andrei

Comment 8 Andre Robatino 2011-11-02 21:21:02 UTC
(In reply to comment #7)

> rsync-3.0.8-2.fc14 fixes the problem.
> Thank you!  Karma's been left.

In your comment in https://admin.fedoraproject.org/updates/rsync-3.0.8-2.fc14 , you said you tested in F16 Beta. My testing indicates that this bug is fixed in F16, but NOT in F14 or F15. Did you actually test in F14 as well, or just F16?

Comment 9 Andrei Gaponenko 2011-11-03 14:42:02 UTC
Hi, 

Just tested rsync-3.0.8-2.fc14 on Fedora 14.   

rsync some/path localhost:other/path

works fine.   Did the failed test use the updated package on both source and destination machines?

Andrei

Comment 10 Andre Robatino 2011-11-03 16:57:09 UTC
rsync to localhost works properly for me as well, but rsync to a _different_ machine does not (and this is how I did each of the tests on F14, F15, and F16):

[andre@localhost ~]$ mkdir src
[andre@localhost ~]$ touch src/aaa
[andre@localhost ~]$ chmod a-w src
[andre@localhost ~]$ rsync -av src 192.168.1.2:
andre.1.2's password: 
sending incremental file list
src/
src/aaa
rsync: mkstemp "/home/andre/src/.aaa.dt2Qyk" failed: Permission denied (13)

sent 107 bytes  received 35 bytes  25.82 bytes/sec
total size is 0  speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1052) [sender=3.0.8]
[andre@localhost ~]$ chmod a+w src
[andre@localhost ~]$ rsync -av src 192.168.1.2:
andre.1.2's password: 
sending incremental file list
src/
src/aaa

sent 107 bytes  received 35 bytes  31.56 bytes/sec
total size is 0  speedup is 0.00
[andre@localhost ~]$ rpm -q rsync
rsync-3.0.8-2.fc14.x86_64
[andre@localhost ~]$

Comment 11 Andrei Gaponenko 2011-11-03 17:03:52 UTC
Hi Andre,

[andre@localhost ~]$ rpm -q rsync
rsync-3.0.8-2.fc14.x86_64

right, but what's the version of rsync on the target host (192.168.1.2)?

Andrei

Comment 12 Andre Robatino 2011-11-03 17:07:20 UTC
Oh wait, I noticed that you said the _destination_ machine also had to have the updated rsync. My other machine (192.168.1.2) is F15 x86_64 which had rsync-3.0.8-1.fc15.x86_64. After updating it to rsync-3.0.8-2.fc15.x86_64 from updates-testing, the above test works. I will retest on F15 and F16 as well.

Comment 13 Andre Robatino 2011-11-03 17:37:33 UTC
OK. I retested on F14, F15, and F16. In each case, it works when the remote machine has the updates-testing version of rsync, and fails when it has the stable version. The fact that it previously worked for me on F16 when the remote machine had the stable version must have been an error in leaving the src/ directory on the remote machine from a previous test. I will change my karma for F14 and F15 to +1.

Comment 14 Andrei Gaponenko 2011-11-03 18:22:08 UTC
Thank you, Andre!

Comment 15 Fedora Update System 2011-11-11 01:23:50 UTC
rsync-3.0.8-2.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2011-11-20 23:54:40 UTC
rsync-3.0.8-2.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2011-11-25 23:28:11 UTC
rsync-3.0.8-2.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.