rsync --no-perms still preserves permissions and ignores umask

From the rsync man page:

To give new files the destination-default permissions (while leaving existing files unchanged), make sure that the --perms option is off and use --chmod=ugo=rwX (which ensures that all non-masked bits get enabled).


rsync --copy-links --recursive --times --group --no-perms --chmod=ugo=rwX afile afile2

... should do the trick with the example files you showed.

If the source files have permissions of, say 777...

rsync --copy-links --recursive --times --group --no-perms --chmod=ugo=rw,-X afile afile2

... will remove the executable flag.