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

            Bug ID: 13222
           Summary: rsync creates warning if time of destination file
                    differs in fractional part of second and owner
                    mismatches
           Product: rsync
           Version: 3.1.2
          Hardware: x86
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: core
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]

reproduction:
1. create file on machine A and chown it to 666
2. create file on machine B with slightly different timestamp (within same
second) and chown it to 666
3. under different user (who can write the directory), rsync -a this file from
machine A to B

expected:
file on B now has the same timestamp as file on A. (worked using rsync 3.1.0,
also works if time difference is more than one second)

results:
file on B retains different timestamp and error is generated


more detailed:

# create files
mueller@trotsig:~> ssh invik 'rm -f aa; touch aa; chmod 666 aa; ls -l
--full-time aa'; rm -f aa; touch aa; chmod 666 aa; ls -l --full-time aa
-rw-rw-rw- 1 mueller trusted 0 2018-01-15 16:25:03.299655606 +0100 aa
-rw-rw-rw- 1 mueller trusted 0 2018-01-15 16:25:03.310296840 +0100 aa

# try to copy files under different user
cron@trotsig:/home/mueller> rsync -a aa invik:/home/mueller
rsync: failed to set times on "/home/mueller/aa": Operation not permitted (1)
rsync error: some files/attrs were not transferred (see previous errors) (code
23) at main.c(1178) [sender=3.1.2]

# timestamp still wrong
cron@trotsig:/home/mueller> ls -l --full-time /home/mueller/aa; ssh invik ls -l
--full-time /home/mueller/aa
-rw-rw-rw- 1 mueller trusted 0 2018-01-15 16:29:50.087861989 +0100
/home/mueller/aa
-rw-rw-rw- 1 mueller trusted 0 2018-01-15 16:29:50.079375446 +0100
/home/mueller/aa

# first user touches file for bigger time delta
mueller@trotsig:~> touch aa

# copy under second user now succeeds
cron@trotsig:/home/mueller> rsync -a aa invik:/home/mueller
cron@trotsig:/home/mueller>

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
  • [Bug 13222] New: rsyn... just subscribed for rsync-qa from bugzilla via rsync

Reply via email to