mprasad10021994
New Member
Hi Folks,
I knew that the default umask value for the root user: 0022 and for normal user 0002
But I see in RHEL 9.0 by the default umask value is same for both root and normal users: 0022!
when I check in bashrc and login.defs configuration files the default values as follows,
Would you please help me if any changes related to default umask value in RHEL 9.0 and later versions?
[ec2-user@xxxxxxxxx ~]$ cat /etc/bashrc | grep -i umask
# By default, we want umask to get set. This sets it for non-login shell.
umask 002
umask 022
[ec2-user@xxxxxxxx ~]$ cat /etc/login.defs | grep -i umask
# Default initial "umask" value used by login(1) on non-PAM enabled systems.
# Default "umask" value for pam_umask(8) on PAM enabled systems.
# UMASK is also used by useradd(8) and newusers(8) to set the mode for new
UMASK 022
# If HOME_MODE is not set, the value of UMASK is used to create the mode.
[ec2-user@xxxxxxxx~]$ cat /etc/redhat-release
Red Hat Enterprise Linux release 9.0 (Plow)
I knew that the default umask value for the root user: 0022 and for normal user 0002
But I see in RHEL 9.0 by the default umask value is same for both root and normal users: 0022!
when I check in bashrc and login.defs configuration files the default values as follows,
Would you please help me if any changes related to default umask value in RHEL 9.0 and later versions?
[ec2-user@xxxxxxxxx ~]$ cat /etc/bashrc | grep -i umask
# By default, we want umask to get set. This sets it for non-login shell.
umask 002
umask 022
[ec2-user@xxxxxxxx ~]$ cat /etc/login.defs | grep -i umask
# Default initial "umask" value used by login(1) on non-PAM enabled systems.
# Default "umask" value for pam_umask(8) on PAM enabled systems.
# UMASK is also used by useradd(8) and newusers(8) to set the mode for new
UMASK 022
# If HOME_MODE is not set, the value of UMASK is used to create the mode.
[ec2-user@xxxxxxxx~]$ cat /etc/redhat-release
Red Hat Enterprise Linux release 9.0 (Plow)
Last edited: