Friday, January 23, 2009

SFTP umask

Do this pico /opt/
# This is a wrapper around the sftp-server subsystem to set umask. Point
# the subsystem in /etc/ssh/sshd_config to this file. (Ubuntu/Debian
# file locations assumed)

umask 0002
exec /usr/lib/openssh/sftp-server

Remember to chmod ugo+x /opt/

Then pico /etc/ssh/sshd_config

Replace/edit this part:
# Subsystem sftp /usr/lib/openssh/sftp-server # replaced with below
Subsystem sftp /opt/

Finally remember: /etc/init.d/ssh restart

No comments: