"rsync: failed to set permissions on ..." error with rsync -a or -p option

  • When I use the -a option as is asked and answered in Preserve the permissions with rsync, I got a lot of "rsync: failed to set permissions on" errors.

    rsync: failed to set permissions on "/ata/text/RCS/jvlc,v": Operation not permitted (1)
    rsync: failed to set permissions on "/ata/text/RCS/jvm,v": Operation not permitted (1)
    rsync: failed to set permissions on ...
    

    Why is this? The files are normal files with permission of 0664.

    Can you give us ls -al output for some of the affected files?

  • cjm

    cjm Correct answer

    10 years ago

    Most likely, rsync on the destination end is not running as a user with permission to chmod those files (which would have to be either the file's owner or root).

    It just happened that the files are owned by _www. Changing the owner solved this issue. Thanks for the help.

    It should be noted that you'll get this error even if rsync's user is in the same group a the files. To fix this error, the files must belong to the same user as rsync, not just the group.

License under CC-BY-SA with attribution


Content dated before 6/26/2020 9:53 AM