[Bug 13222] New: rsync creates warning if time of destination file differs in fractional part of second and owner mismatches
samba-bugs at samba.org
samba-bugs at samba.org
Mon Jan 15 15:35:16 UTC 2018
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: wayned at samba.org
Reporter: mueller at relog.ch
QA Contact: rsync-qa at samba.org
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 at 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 at 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 at 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 at trotsig:~> touch aa
# copy under second user now succeeds
cron at trotsig:/home/mueller> rsync -a aa invik:/home/mueller
cron at trotsig:/home/mueller>
--
You are receiving this mail because:
You are the QA Contact for the bug.
More information about the rsync
mailing list