--- src/copy.c.orig 2010-01-03 09:06:20.000000000 -0800 +++ src/copy.c 2010-01-31 19:20:14.000000000 -0800 @@ -2002,12 +2002,14 @@ else if (S_ISREG (src_mode) || (x->copy_as_regular && !S_ISLNK (src_mode))) { - copied_as_regular = true; /* POSIX says the permission bits of the source file must be used as the 3rd argument in the open call. Historical practice passed all the source mode bits to 'open', but the extra bits were ignored, so it should be the same either way. */ - if (! copy_reg (src_name, dst_name, x, src_mode & S_IRWXUGO, + mode_t S_IRWUGO = S_IRWXUGO & ~(S_IXUSR|S_IXGRP|S_IXOTH); + mode_t d_mode = (x->preserve_mode ? src_mode : (src_mode|S_IRWUGO) & ~cached_umask ()); + copied_as_regular = true; + if (! copy_reg (src_name, dst_name, x, d_mode & S_IRWXUGO, omitted_permissions, &new_dst, &src_sb)) goto un_backup; }