umask: Users file creation mask umount Unmount a device

User?s file creation mask. umask sets an environment variable which automatically sets file permissions on newly created files. i.e. it will set the shell process?s
file creation mask to mode.
Syntax
umask [-p] [-S] [mode]

Key
mode File creation mask
-S Print the mask in symbolic format
-p Output in a form that may be reused as input
The mode specified works as a mask, if mode is omitted, the current value of the mask will be printed.
You can set umask in /etc/bashrc or /etc/profile for all users. By default most Linux distros will set it to 0022 (022) or 0002 (002).
So the file will contain
umask 022
If mode begins with a digit, it is interpreted as an octal number;
if not, it is interpreted as a symbolic mode mask similar to that accepted by
the chmod command.

The return status is zero if the mode is successfully changed or if no mode
argument is supplied, and non-zero otherwise.

Note that when the mode is interpreted as an octal number, each number of the
umask is subtracted from 7. Thus, a umask of 022 results
in permissions of 755.
umask is a bash built in command.

"Woe to him who doesn?t know how to wear his mask, be he king or Pope!"
- Luigi Pirandello
Tags
Comments
Write the first comment
Leave a trace
Name *
Email *
Website
Anti SPAM * Code (7 + 2) =
Leave me a comment *
 
All comments are subject to editorial review
Post being viewed right now
Item date: 21.07.2009
Views: 421
Item date: 18.06.2009
Views: 2153
Item date: 10.04.2009
Views: 794
Item date: 26.09.2009
Views: 2080
Item date: 04.02.2009
Views: 1035
Item date: 08.03.2009
Views: 615
Item date: 27.09.2009
Views: 1326
Item date: 12.10.2009
Views: 817
Item date: 26.09.2009
Views: 870
Item date: 02.01.2009
Views: 1014