umask.1 (2010 09)

u
umask(1) umask(1)
NAME
umask - set or display the file mode creation mask
SYNOPSIS
Set Mask
umask mask
Display Mask
umask [-S]
DESCRIPTION
The
umask command sets the value of the file mode creation mask or displays the current one. The
mask affects the initial value of the file mode (permission) bits for subsequently created files.
Setting the File Mode Creation Mask
The
umask mask command sets a new file mode creation mask for the current shell execution environ-
ment. mask can be a symbolic or numeric (obsolescent) value.
A symbolic mask provides a flexible way of modifying the mask permission bits individually or as a group.
A numeric mask specifies all the permission bits at one time.
When a mask is specified, no output is written to standard output.
Symbolic Mask Value
A symbolic mask replaces or modifies the current file mode creation mask. It is specified as a comma-
separated list of operations in the following format. Whitespace is not permitted.
[who][operator][permissions][, ...]
The fields can have the following values:
who One or more of the following letters:
u Modify permissions for user (owner).
g Modify permissions for group.
o Modify permissions for others.
Or:
a Modify permissions for all (a = ugo).
operator One of the following symbols:
+ Add permissions to the existing mask for who.
- Delete permissions from the existing mask for who.
= Replace the existing mask for who with permissions .
permissions One or more of the following letters:
r The read permission.
w The write permission.
x The execute/search permission.
If one or two of the fields are omitted, the following table applies:
Format Entered Effect Input Equals
gg=who Delete current permissions for who
-operator No action (none)
Equal to:
a+permissions rw a+rwpermissions
who
=u=u=Delete current permissions for who
who
+u+No action (none)
who
-u-No action (none)
Equal to: who
=permissions ux u=xwhopermissions
Equal to:
aoperatorpermissions -rw a-rwoperatorpermissions
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (4 pages)