UNIX Guide, for beginners and Mac OS X users
You are here: SillyDog701 > UNIX Guide >SillyDog701 > UNIX Guide > (index) supportSupport - ask in our friendly forums.

Changing default access permissions

You will need to understand how to set file access permissions numerically before reading this section.

Every time you create a file or a directory, its access permissions are set to a predetermined value. This value is defined by the file-creation mode mask.

To display the value of this mask enter the command:

   umask

This will produce something like:

   077

Sometimes the 0 (zero) is omitted. The values might be different on your system.

Without the mask the system would set permissions of 666 for files and 777 for directories when first created. The values in the mask are subtracted from these values to give a default value for access permissions for the files and directories created by you.

For example:

    777     (system value for directories)
   -077     (value of the umask)
    ---
    700     (default access permission of
             rwx------)

To change your default access permissions you use the command:

    umask nnn

Each "n" is a number from 0 to 7.


[Home]UNIX Guide home | [Search]search | index
Page URL: http://sillydog.org/unix/
[SillyDog701] [Netscape] [MozInfo701] [MacCentre701] [UNIX Guide] [AntTunes701][Forums] [Search] [Change Log] [Feedback] [About Us] [Sitemap]
This UNIX Guide maintained by SillyDog701, portion of this Guide is based on UNIXhelp. UNIXhelp is copyright University of Edinburgh. This page was last modified on 14 March, 2006
Netscape NOW!Made on a Mac
support MozInfo701 and SillyDog701