umask(1) umask(1)
NAME
umask - set file-creation mode mask
SYNOPSIS
umask [-S] [mask]
DESCRIPTION
The user file-creation mode mask is set to mask. This mask
shall affect the initial value of the file permission bits of
subsequently created files (see creat(2)).
The mask can be either symbolic form, or octal form. See
chmod(1) for a description of the syntax for mask. If mask is
in symbolic form, then the umask is set to the logical
complement of the result of the symbolic definition. (That is,
the symbolic form should specify the permissions to allow
through, not the permissions to mask out.) If the mask is in
octal form, then each set bit will mask the matching
permission (the complement of the symbolic form).
If mask is omitted, the current value of the mask is printed
in either symbolic or octal form (see the -S option).
umask is recognized and executed by the shell.
umask can be included in the user's .profile (see profile(4))
and invoked at login to automatically set the user's
permissions on files or directories created.
OPTIONS
-S Mask is in symbolic form. If this option is not
specified, the mask is printed in octal form. The output
for symbolic form is the same as the output from
printf(1) given this input:
"u=%s,g=%s,o=%s\n" owner_perms group_perms other_perms
Each permissions string has the same meaning as
permissions in the arguments to chmod(1).
EXAMPLES
For example, umask 022 and umask a=rx,u+w, both remove group
and others write permission (files normally created with mode
777 become mode 755; files created with mode 666 become mode
644).
Copyright 1994 Novell, Inc. Page 1
umask(1) umask(1)
FILES
/usr/lib/locale/locale/LC_MESSAGES/uxcore.abi
language-specific message file [See LANG on environ(5).]
REFERENCES
chmod(1), chmod(2), creat(2), profile(4), sh(1), umask(2)
NOTICES
The octal form of umask is only provided for backward
compatibility, and may not be supported in future releases. It
should therefore be avoided.
Copyright 1994 Novell, Inc. Page 2