Adjusting UMASK items on a CentOS/RedHat system.
sudo nano /etc/bashrc
Search through the code and find the chunk of code that looks something like this:
# By default, we want this to get set. # Even for non-interactive, non-login shells. if [ $UID -gt 99 ] && [ "`id -gn`" = "`id -un`" ]; then umask 002 else umask 022 fi
umask value in the
else logic to:
Adjusting UMASK items on an Ubuntu/Debian system.
sudo nano /etc/profile
The last line of the file should have a
umask entry that reads as follows:
umask value to:
If that line is not in the file, just add it to the file and save it.
Adjustments to the
pam.d UMASK settings on an Ubuntu/Debian system.
sudo nano /etc/pam.d/common-session
Find the line that reads something like this:
session optional pam_umask.so
Change it to this by adding
umask=0002 to the end of the line:
session optional pam_umask.so umask=0002