[techtalk] default umask

Phil Savoie Phil.Savoie at learnix.ca
Thu Dec 28 14:39:16 EST 2000


Naomi Hospodarsky wrote:
> 
> What can anyone tell me about umask, and how it can work for me as an
> administrator of users....just looking for simple tips, personal
> situations, etc, if there are any.
> 
> Thanks,
> 
> Naomi
> 
> _______________________________________________
> techtalk mailing list
> techtalk at linuxchix.org
> http://www.linux.org.uk/mailman/listinfo/techtalk


 Hi Naomi,

The umask (users mask) is an octal number that is subtracted from the
default file permissions.

By default all directories are created with permissions of 777 or
drwxrwxrwx and all files are created by default of 666 -rw-rw-rw-

By applying the umask of 022 with is applied through an entry in the
/etc/profile, files and directories are created thusly:

Files 644 -rw-r--r--
Directories 755 drwxr-xr-x

By increasing the umask value, you can limit the defaults of permissions
on file and directories that the user can create.  Be warned that
changing the umask in /etc/profile will apply to all users including the
root user as this file is a globally read file applicable to all users
using the bourne, korn and bash shells.

This value can be overridden by an entry in the users profile files by
either the user or the root user depending on your situation.  The umask
value can be determined by typing umask at the prompt and changed by
typing umask <new_value> at the prompt as well.

Hope this helps you,

Phil




More information about the Techtalk mailing list