CertGrid CertGrid
Hands-on Lab·Red Hat Certified System Administrator

Default Permissions and umask

One objective. The arithmetic is simple once you know files start from 666 and directories from 777 - and that the umask *removes* bits rather than granting them, which is why a new file is never executable however permissive the umask.

Security and SELinux Guide 54 of 67 Beginner

Written against the versions above. Two places set it and they are not interchangeable. **`/etc/login.defs UMASK`** is applied by `pam_umask` at login, for any session. **`/etc/profile` and `/etc/bashrc`** set it for shells. RHEL 10's default is `022` for root and `002` for ordinary users, because of the user private group scheme.

Every command on this page runs on RHCSA-A01.
Server NameIP AddressOSRolesCPURAMHDD
RHCSA-A01192.168.0.31RHEL 10.0 (Coughlan)Practice node (graded) - spare /dev/sda2 Core4 GB50 GB + 15 GB

Before you start

  1. What it does

  2. Changing it

  3. Making it stick

Official sources