How can umask be set on the remote host for chrooted sftp users? I'm having trouble guessing how to set umask for sftp users on the remote system. AFAIK, it is usually function of the shell, which is not used by the sftp client.
~/.cshrc, ~/.profile, and ~/.login seem to not affect sftp, nor did /etc/csh.cshrc or /etc/csh.login A workaround for non-chroot sftp: If the sftp user authenticated using a key, then the key in the ~/.ssh/authorized_keys file can be modified with this: command="umask 0002;/usr/libexec/sftp-server;" but that constrains that key to sftp use only and no ssh action. That work-around, obviously, won't work in the chrooted sftp. /Lars

