On Tue, 2007-12-11 at 20:45 +0530, [EMAIL PROTECTED] wrote: > Yes Exactly. > When I give; > > $ ssh [EMAIL PROTECTED] umask > 077 > 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 page. 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 destination. Matt -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
