Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)

User Commands (t - u) umask(1)
NAME
umask - Sets the user le-creation mask.
SYNOPSIS
umask [-S] [mask]
-S Produces symbolic output.
DESCRIPTION
The umask command sets the user le-creation mask to the value specied in the argument
mask.
The default permissions is 666 (rw-rw-rw) for les and 777 (rwxrwxrwx) for directories. The
permissions value you specify with the umask command will modify the default permissions.
The mask argument can be either octal number or a symbolic value. If an octal value is given,
the new umask value is the complement of the result of applying mask to the complement of the
current umask value.
If mask is omitted, the current value of the mask is printed.
Symbolic Mode
Symbolic mode has the form:
[who] operation permission,[operation permission ...]
The who argument species whether you are dening permissionsfor a user, group, or all others,
or any combination of these. The operation argument species whether the permission is being
added, removed, or assigned absolutely. The permission argument identies the operation that
the specied users can perform.
Valid options for the who argument are as follows:
a User, group, and all others (same effect as the combination ugo)
g Group
o All others
u User (owner)
If the who argument is omitted, the default value is a, but the setting of the le creation mask,
umask (see the reference page for sh(1)), is applied.
Valid options for the operation argument are as follows:
- Removes specied permissions.
+ Adds specied permissions.
Valid options for the permission argument are as follows:
r Read permission.
w Write permission.
x Execute permission for les, search permission for directories.
s Set-user-ID or set-group-ID permission.
This permission bit sets the effective user ID or group ID to that of the owner or group
owner of le whenever the le is run. Use this permission setting with the u or g option
to allow temporary or restricted access to les not normally accessible to other users.
527188-004 Hewlett-Packard Company 927