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.
This error might also pop-up if you run the rsync process for files that are not recently modified in the source or destination...because it cant set the time for the recently modified files.
I had the same problem. For me the solution is to delete the remote file and let
rsync
create again.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.I've seen that problem when I'm writing to a filesystem which doesn't (properly) handle times -- I think SMB shares or FAT or something.
What is your target filesystem?
This happened to me on a partition of type
xfs (rw,relatime,seclabel,attr2,inode64,noquota)
, where the directories where owned by another user in a group we were both members of. The group membership was already established before login, and the whole directory structure was group-writeable. I had manually runsudo chown -R otheruser.group directory
andsudo chmod -R g+rw directory
to confirm this.I still have no idea why it didn't work originally, but taking ownership with
sudo chown -R myuser.group directory
fixed it. Perhaps SELinux-related?It could be that you don't have privileges to some of the files. From an administrator account, try "sudo rsync -av " Alternately, enable the root account and sign in as root. That should allow you to completely hose your system and brute force your rsync! ;-) I'm not sure if the above mentioned --extended-attributes will help, but I threw it in too, just for good measure.