umask - Get or set the file mode creation mask

Synopsis

umask [ -S ] [ mask ]

Description

You can use umask to set or display the file creation mask. The mask allows you to control the file permission bits that are set when creating a file or directory.

If you specify mask, qsh sets the file creation mask to mask. If you do not specify mask, qsh displays the current file creation mask on standard output.

Options

Operands

When using symbolic permissions, mask is an expression that defines which permissions should not be removed. A symbolic permission is an expression with the format [ who ] op [ permission ] where:

Exit Status

Related information

Examples
  1. Display the current file creation mask in symbolic form: umask -S
  2. Display the current file creation mask: umask
  3. Set the file creation mask to remove read permission for others: umask 004
  4. Set the file creation mask to remove write permission for group: umask -S g-w