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

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


https://bugzilla.samba.org/show_bug.cgi?id=3718

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


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
1).

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: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- 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