Escolar Documentos
Profissional Documentos
Cultura Documentos
org/wiki/Umask
Umask
From Wikipedia, the free encyclopedia
The title of this article should be umask. The initial letter is capitalized due to technical restrictions.
umask (abbreviated from user file creation mode mask) is a function on POSIX environments which sets the default
file system mode for newly created files of the current process. To create files with given permissions, the
corresponding umask value can be caluclated using two equivalent methods: (note that umasks must always be
calculated in octal)
- bitwise exclusive OR operation of the argument and the full access mode 777.
- bitwise AND of the unary complement of the argument (using bitwise NOT) and the full access mode 777.
Most Unix shells provide an umask command that affects all child processes executed in this shell.
Examples
To set the mode of newly created files to 0600 (-rw------) we need
umask 177
See also
chmod
External links
Manpage of umask(2) (http://www.openbsd.org/cgi-bin/man.cgi?query=umask&sektion=2) from OpenBSD
1 of 1 07-06-2006 11:03