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

前端 未结 9 1894
暖寄归人
暖寄归人 2021-01-29 19:27

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:          


        
相关标签:
9条回答
  • 2021-01-29 19:43

    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.

    0 讨论(0)
  • 2021-01-29 19:49

    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.

    0 讨论(0)
  • 2021-01-29 19:53

    The problem in my case was that the "receiver mountpoint" was incorrectly mounted. It was in read-only mode (for some extrange reason). It looked like rsync was copying the files, but it was not. I checked my fstab file and changed mount options to default, re-mount file system and execute rsync again. All fine then.

    0 讨论(0)
  • 2021-01-29 19:53

    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.

    0 讨论(0)
  • 2021-01-29 19:55

    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?

    0 讨论(0)
  • 2021-01-29 19:56

    As @racl101 has commented on an answer, this problem might be related to the folder owner. The rsync command should be done by the same user as the folder owner's one. If it's not the same, you can change it.

    chown -R userCorrect /remote/path/to/foo/bar
    
    0 讨论(0)
提交回复
热议问题