We relaunched the TWiki.org project with an expanded TWiki charter, and we invite you to participate! The TWiki.org Code of Conduct agreement took effect on 27 Oct 2008. We ask existing twiki.org users to opt-in. You need to opt-in to participate in the Blog, Codev, Plugins and TWiki webs. -- PeterThoeny - 27 Oct 2008
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 - 07 Sep 2003 - 01:52:00 - AnitaLewis
 
TWIKI.NET
Copyright © 1999-2008 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
See TWiki's New Look