Tags:
create new tag
, view all tags
See BLT.

umask: Linux command to set the file creation mask.

In my own words, I think that you can set a umask in several different locations (fstab?), and possibly different umasks for different directories or users. Once a umask is set, when a file is created, its default permissions are a function of the umask. Example: if the umask is 022 new files are created with permissions 0666 & ~022 = 0644 (= rw-r--r--).

The following is quoted from the Linux Programmer's Manual at http://unixhelp.ed.ac.uk/CGI/man-cgi?umask+2 -- I still don't know how to invoke it, or when it works.

umask sets the umask to mask & 0777.

The umask is used by open(2) to set initial file permissions on a newly-created file. Specifically, permissions in the umask are turned off from the mode argument to open(2) (so, for example, the common umask default value of 022 results in new files being created with permissions 0666 & ~022 = 0644 = rw-r--r-- in the usual case where the mode is specified as 0666).

Contributors

  • RandyKramer - 16 Jan 2002
  • <If you edit this page, add your name here, move this to the next line>
Topic revision: r3 - 2003-09-07 - AnitaLewis
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding WikiLearn? Send feedback
See TWiki's New Look