commands
umask — inspect or set creation mask
Bash builtin: sets or displays creation mask; -S shows symbolic form, -p displays reusable command. Normally removes bits from requested creation mode unless default ACL inheritance applies. Existing mode bits remain unchanged. Scope is current shell and future children. Example assumes a fresh permissions lab fixture.
Formal Syntax & Structure
linux syntaxlinux
umask [-p] [-S] [MODE]Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| MODE | operand | optional octal or symbolic mask |
| -S | option | symbolic display |
| -p | option | reusable command |
Return Value
exit status and output
Bash builtin: sets or displays creation mask; -S shows symbolic form, -p displays reusable command. Normally removes bits from requested creation mode unless default ACL inheritance applies. Existing mode bits remain unchanged. Scope is current shell and future children.
Working Example
Example Snippetlinux
(umask 077; touch private.txt; stat -c %a private.txt)