Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)
User Commands (t - u) umask(1)
NAME
umask - Sets the user file-creation mask.
SYNOPSIS
umask [-S] [mask]
-S Produces symbolic output.
DESCRIPTION
The umask command sets the user file-creation mask to the value specified in the argument
mask.
The default permissions is 666 (rw-rw-rw) for files 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 specifies whether you are defining permissionsfor a user, group, or all others,
or any combination of these. The operation argument specifies whether the permission is being
added, removed, or assigned absolutely. The permission argument identifies the operation that
the specified 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 file creation mask,
umask (see the reference page for sh(1)), is applied.
Valid options for the operation argument are as follows:
- Removes specified permissions.
+ Adds specified permissions.
Valid options for the permission argument are as follows:
r Read permission.
w Write permission.
x Execute permission for files, 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 file whenever the file is run. Use this permission setting with the u or g option
to allow temporary or restricted access to files not normally accessible to other users.
527188-007 Hewlett-Packard Company 9−27