umaskมักจะมีการตั้งค่าระบบกว้างผ่านไฟล์ config: /etc/login.defs:
$ grep UMASK /etc/login.defs
UMASK 077
ค่านี้สามารถแทนที่ แต่โดยทั่วไปแล้วไม่ผ่านทั้ง/etc/bashrc, /etc/profileและ / หรือโดยผู้ใช้ในการของพวกเขา$HOME/.bashrc(สมมติว่าพวกเขากำลังใช้ทุบตี)
หากคุณgrepใช้ "umask" ในไฟล์ดังกล่าวคุณจะสังเกตเห็นสิ่งนี้ได้ในกล่อง RHEL:
$ grep umask /etc/bashrc /etc/profile
/etc/bashrc: # By default, we want umask to get set. This sets it for non-login shell.
/etc/bashrc: umask 002
/etc/bashrc: umask 022
/etc/profile:# By default, we want umask to get set. This sets it for login shell
/etc/profile: umask 002
/etc/profile: umask 022
ขุดลึกลงไป:
/etc/bashrc
# By default, we want umask to get set. This sets it for non-login shell.
# Current threshold for system reserved uid/gids is 200
# You could check uidgid reservation validity in
# /usr/share/doc/setup-*/uidgid file
if [ $UID -gt 199 ] && [ "`id -gn`" = "`id -un`" ]; then
umask 002
else
umask 022
fi
/etc/profile
# By default, we want umask to get set. This sets it for login shell
# Current threshold for system reserved uid/gids is 200
# You could check uidgid reservation validity in
# /usr/share/doc/setup-*/uidgid file
if [ $UID -gt 199 ] && [ "`id -gn`" = "`id -un`" ]; then
umask 002
else
umask 022
fi
ดังนั้นอย่างน้อยในระบบ RHEL ก็umaskคือ002ถ้า UID ของคุณมากกว่า 199 และ022อื่น ๆ (บัญชีระบบ)