Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. 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

The umask controls the default file creation permissions, 0002 means files will have 664 and directories 775. Setting this (by editing the umask line at the bottom of /etc/profile in my case) means files created by one user will be writable by other users in the www-group without needing to chmod them.

I've looked that up, but I am told:

# The default umask is now handled by pam_umask.  
# See pam_umask(8) and /etc/login.defs.

And here I am blocked as I don't know pam_umask, I want to change the umask to 0002. How to?

share|improve this question
up vote 3 down vote accepted

From man 8 pam_umask:

Add the following line to /etc/pam.d/login to set the user specific umask at login:

               session optional pam_umask.so umask=0022

You can change that value to 0002.

share|improve this answer

The right place under debian is:


session optional pam_umask.so umask = #VALUE (e.g. 0026)

share|improve this answer

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.