Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ umask(1) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chmod

csh

sh, Rsh

discussion of



UMASK(1,C)                  AIX Commands Reference                   UMASK(1,C)



-------------------------------------------------------------------------------
umask



PURPOSE

Displays and sets file-creation permission code mask.

SYNTAX


         +-------+
umask ---|       |---|
         +- nnn -+


DESCRIPTION

The umask command sets your file-creation mask to nnn, three octal digits that
represent the read/write/execute permissions for owner, group, and others,
respectively.  When you create a file the system ANDs the complement of nnn to
777 for directories and 666 for files, in effect removing the corresponding
permissions.  (See "chmod" for more information on file and directory
permission codes.)

If you do not specify nnn, umask displays the current value of your
file-creation permission code mask.  The initial system mask (set in
/etc/profile) is "022".

The umask command is actually a built-in subcommand of the sh and csh commands.

EXAMPLES

  1. To display the current file creation mask:

      umask

  2. To prevent other people from writing to the directories or files you
    create in the future:

      umask 022

    This sets the file creation mask to "022", which takes away write
    permission for group members and others.  Directories are created with the
    permission code "755".  Files are created with "644".

  3. To prevent other people from using your files:

      umask 077





Processed November 8, 1990        UMASK(1,C)                                  1





UMASK(1,C)                  AIX Commands Reference                   UMASK(1,C)



    This sets the file creation mask to "077", which removes read, write, and
    execute permission for group members and others.  Now files are created
    with permission code "600".

RELATED INFORMATION

See the following commands:  "chmod,"  "csh," and  "sh, Rsh."

See the creat, chmod, mknod, open, and umask calls in AIX Operating System
Technical Reference.

See the discussion of file permissions in Using the AIX Operating System.

See the discussion of tailoring the user environment in Managing the AIX
Operating System.








































Processed November 8, 1990        UMASK(1,C)                                  2



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