Permission issue while using rsync.
matt at mattmccutchen.net
Tue Dec 11 20:19:42 GMT 2007
On Tue, 2007-12-11 at 20:45 +0530, vasumg at gmail.com wrote:
> Yes Exactly.
> When I give;
> $ ssh mcstrans at hostname umask
> Which explains my problem.
> Is this taking from /etc/profile?. B'cos under ~msctrans/.profile, the
> umask is set to 022.
> How do I by-pass and tell rsync to not to take from /etc/profile.
> Our admin team is not ready to chage the umask to 022 in /etc/profile
> for security reasons.
When you launch rsync on the local machine, the remote sshd runs the
remote user's shell (defined in /etc/passwd) and passes it the rsync
server command line. Which startup files (if any) take effect is under
the control of this shell, not rsync. If you are using bash, its
somewhat complex startup file behavior is documented in the bash(1) man
In any case, you can override the umask specifically for the remote
rsync by passing --rsync-path='umask 0022 && rsync' . Assuming that the
filesystem and the installed rsync on "hostname" both support POSIX
ACLs, an alternative way to specify that new destination files should
get 644/755 permissions is to set a default ACL of 755 on the
More information about the rsync