rsyncfile-transfer

rsync error: failed to set times on "/foo/bar": Operation not permitted


I'm getting a confusing error from rsync and the initial things I'm finding from web searches (as well as all the usual chmod'ing) are not solving it:

rsync: failed to set times on "/foo/bar": Operation not permitted (1)
rsync error: some files could not be transferred (code 23) 
  at /SourceCache/rsync/rsync-35.2/rsync/main.c(992) [sender=2.6.9]

It seems to be working despite that error, but it would be nice to get rid of that.


Solution

  • If /foo/bar is on NFS (or possibly some FUSE filesystem), that might be the problem.

    Either way, adding -O / --omit-dir-times to your command line will avoid it trying to set modification times on directories.