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

This error happens, because operation for changing the permissions is not permitted. So either check if your user executing the commands have the correct permissions (e.g. he's not the owner), or your file system doesn't support it.

You can ignore the warnings by specifying the additional arguments to rsync to --no-perms and -O (--omit-dir-times) to avoid trying to set permissions and modification times on files/directories. This should solve the errors. Alternatively avoid using -a.


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).


As already said, the problem occurs whenever you don't have the permission to change file permissions on the destination of rsync. However, you can avoid this error message by using the two additional arguments --no-o and --no-g.

Example:

rsync -ahv --no-o --no-g target/ destination/