Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I want files sent to my server using sftp and scp to be group-writable. How can I do that?

I tried using libpam-umask from but it didn't work.

share|improve this question

2 Answers 2

I think PAM reads the default umask from /etc/login.defs as of Debian 6.0, but I do not currently have access to a system to check on.

share|improve this answer

Add the following line to your /etc/pam.d/sshd file and change the umask to whatever you want:

session optional umask=0002

share|improve this answer
Any further details you could share? –  vonbrand Mar 2 '13 at 20:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.