Skip to content

Navigation Menu

Sign in
Sign up
pyllyukko edited this page Feb 19, 2026 · 13 revisions

List of places you can configure umask.

Common

  • /etc/login.defs
  • /etc/profile or /etc/profile.d/
  • /etc/init.d/functions
  • sudoers
  • systemd units (see UMask=)

PAM

  • pam_umask
    • umask= entry in the user's GECOS field
    • umask= argument
    • UMASK entry from /etc/login.defs
    • UMASK= entry from /etc/default/login

Non-PAM (shadow)

  • /etc/limits

BSD

  • /etc/login.conf

CentOS

/etc/bashrc

TODO: verify

  • /etc/csh.login
  • /etc/zprofile

References

Debian:

pam (1.5.3-7) unstable; urgency=medium
 Starting with PAM version 1.5.3, Debian supports usergroups for default
 umask of users logging in. If the primary group name of a user
 matches their primary user name (user pat's default group is also
 called pat), then files will be group writable by default. To disable
 this use a group name that differs from the user name or add
 nousergroups to the pam_umask line in
 /etc/pam.d/common-session and
 /etc/pam.d/common-session-noninteractive:
 session optional pam_umask.so nousergroups
 -- Sam Hartman <hartmans@debian.org> 2024年4月08日 16:15:58 -0600

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /