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


  • RandyKramer - 16 Jan 2002
  • <If you edit this page, add your name here, move this to the next line>
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2003-09-07 - AnitaLewis
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by PerlCopyright 1999-2015 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding WikiLearn? WebBottomBar">Send feedback
See TWiki's New Look