DO NOT REPLY [Bug 3718] New: RSync should verify permission/time before commiting a change

samba-bugs at samba-bugs at
Mon Apr 24 15:33:20 GMT 2006

           Summary: RSync should verify permission/time before commiting a
           Product: rsync
           Version: 2.6.5
          Platform: Sparc
        OS/Version: Solaris
            Status: NEW
          Severity: major
          Priority: P3
         Component: core
        AssignedTo: wayned at
        ReportedBy: yair.lenga at
         QAContact: rsync-qa at

I'm using rsync to mirror large repository (with files owned by multiple
users). The repository is subject to updates while rsync is running. I found
that in few cases, the ownership of the files is left as root/other (uid 0, gid

I can not replicate the problem, but I suspect the file was modified (or
removed) while rsync was running (the rsync take ~30 minutes).

I checked the code, and noticed that before "rsync" commit the temp file 
(finish_transfer @ rsync.c), it changes the file attributes (using
'set_file_Attrs'). However, it does not check if the file attributes were
updated succesfully. As a result, it may leave files with the wrong
timestamp/ownership or permission.

My suggested solution is to modify set_file_perms- return 0 for no change, 1
for changes and -1 for error. finish_transfer can than check for failures, and
remove the temp file if the permission/ownership/timestamp is not correct.

Configure bugmail:
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

More information about the rsync mailing list