Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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.