Where Is Default Umask Set in Linux?
Contents

System-wide umask value can be set in /etc/profile or in the default shell configuration files, e.g. /etc/bash. bashrc . Most Linux distributions, including Arch, set a umask default value of 022 (see /etc/profile).

How do I find my default umask in Linux?

The user mask is set by the umask command in a user initialization file. You can display the current value of the user mask by typing umask and pressing Return.
…
Default File Permissions ( umask )

umask Octal Value File Permissions Directory Permissions
1 rw- rw-
2 r– r-x
3 r– r–
4 -w- -wx

How do I change the default umask in Linux?

Default umask permissions for home directory

  1. Backup the /etc/login.defs file and open it for editing.
  2. Update the umask setting and save the file.
  3. Add a new user and check the default permissions of home directory.
  4. Restore the original configuration file back.
Maya Lin-Takahashi

Maya Lin-Takahashi

Consumer Tech & Gadget Reviewer

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.

Share this article
Twitter Facebook Pinterest