Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ umask(C) — OpenDesktop 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chmod(C)

chmod(S)

creat(S)

csh(C)

sh(C)

umask(S)


 umask(C)                        19 June 1992                        umask(C)


 Name

    umask - set file-creation mode mask

 Syntax

    umask [ mask ]

 Description

    The user file-creation mode mask is set to mask.  mask consists of three
    octal digits which refer to read/write/execute permissions for owner,
    group, and others, respectively.  Only the low-order 9 bits of cmask and
    the file mode creation mask are used.  The value of each specified digit
    is ``subtracted'' from the corresponding ``digit'' specified by the sys-
    tem for the creation of any file (see umask(S) or creat(S).  This is
    actually a binary masking operation, and thus the name ``umask''.  In
    general, binary ones remove a given permission, and zeros have no effect
    at all.  For example, umask 022 removes group and others write permission
    (files normally created with mode 777 become mode 755 ; files created
    with mode 666 become mode 644).

    If mask is omitted, the current value of the mask is printed.

    umask is recognized and executed by the shell.  By default, login shells
    have a umask of 022.

    umask is built in to csh and sh.

 See also

    chmod(C), chmod(S), creat(S), csh(C), sh(C), umask(S)

 Standards conformance

    umask is conformant with:

    AT&T SVID Issue 2;
    and X/Open Portability Guide, Issue 3, 1989.


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026