Umask

From Foochal

Jump to: navigation, search


umask is used to create the default permissions of newly created files or directories on linux

Example:

umask 022

The above example specifies permissions to be blocked for newly created files. So if you create a new directory

mkdir test

The permissions are going look like the following:

ls -ld test
drwxr-xr-x  2 user user 4096 Jul 14 15:51 test

So effective permissions are 777 - 022 = 755


Personal tools