UMASK is usually set system-wide somewhere in
/etc; on my systems it is set in the file
login.defs:
Code:
# Default initial "umask" value.
# UMASK is also used by useradd and newusers to set the mode of new home
# directories.
# 022 is the default value, but 027, or even 077, could be considered
# better for privacy. There is no One True Answer here: each sysadmin
# must make up her mind.
UMASK 022
You can see the
UMASK value with the shell built-in:
This default value is, generally, the "right" one for most purposes in that directories are created with
drwxr-xr-x and files are created with
-rw-r--r-- (what you see when you do a long listing with
ls -l). The owner of either a file or directory has full read-write, the group can read and public can read. You can fiddle with
UMASK system-wide (not such a good idea) or on a user-by-user basis in their individual
.profile files (when they log in
UMASK is set for their session). Be sure and read the
umask manual page for what and how to do that.
fmask and
dmask default to the value of
UMASK of the current process (see the manual page for
mount),
fmask and
dmash can be optionally set by
mount.
Hope this helps some.