Rsync: Failed to Set Times on ""

I am trying to rsync files from one server to another but getting this error

rsync: failed to set times on "/dept/intranet/dept/atest/.": Operation not permitted (1)

Can someone help me why so ?

I guess it is some permissions issue.

This is my command:

RSYNC=/usr/bin/rsync
SSH=/usr/bin/ssh
REMOTE_HOST=test.desktop

${RSYNC} -crlt -e ${SSH} ${LOCAL_DIR} ${REMOTE_HOST}:${REMOTE_DIR}

LOCAL_DIR = workplace1/f1/
permissions drwxr-xr-x   11 root     root         4096 Mar 19  2009 f1

REMOTE_DIR=/dept/intranet/dept/atest/f1/
permissions :drwxr-xr-x 14 dbld   a1     4096 Mar 19  2009 f1     
2

3 Answers

Just so we're on the same page:

-r recursive
-l preserve links
-c sync based on file checksum
-t preserve modification times

Then two things:

It's just a filesystem thingy

If the destination folder is a NFS mount, or some filesystem that doesn't handle well mod-times, well it breaks.

Try adding the -O (for --omit-dir-times) parameter to your command.

Modification times will be preserved, but omitted for directories:

${RSYNC} -crlOt -e ${SSH} ${LOCAL_DIR} ${REMOTE_HOST}:${REMOTE_DIR}

This is my best guess, since file sync seems to work, and your error happens on mod time sync. Anyway, do you really need to preserve modification times? The -c option skip files based on checksum (so mod times doesn't matter).

Marcus Vance

Marcus Vance

Cybersecurity & Digital Privacy Researcher

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.