Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ umask(1) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chmod

csh

sh

discussion of

AIX Oper-

umask

PURPOSE

     Displays and sets file-creation permission code mask.

SYNOPSIS
     umask [ ooo ]


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".

EXAMPLES

     1.  To display the current file creation mask:

           umask

     2.  To prevent other people from writing to your directo-
         ries or files:

           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

         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 per-
         mission code "600".

RELATED INFORMATION

     The following commands:  "chmod,"  "csh," and "sh."

     Note:   The csh  command contains  a built-in  subcommand
     named ummask.   The command and subcommand  do not neces-
     sarily work the same way.  For information on the subcom-
     mand, see the csh command.

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

     The discussion of file permissions in Using the AIX Oper-
     ating System.

     The discussion of tailoring  the user environment in Man-
     aging the AIX Operating System.

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