Examples of using the umask command

To give yourself full permissions for both files and directories and prevent the group and other users from having access:

   umask 077

This subtracts 077 from the system defaults for files and directories 666 and 777. Giving a default access permissions for your files of 600 (rw-------) and for directories of 700 (rwx------).


To give all access permissions to the group and allow other users read and execute permission:

   umask 002

This subtracts 002 from the sytem defaults to give a default access permission for your files of 664 (rw-rw-r--) and for your directories of 775 (rwxrwxr-x).


To give the group and other users all access except write access:

   umask 022

This subtracts 022 from the system defaults to give a default access permission for your files of 644 (rw-r--r--) and for your directories of 755 (rwxr-xr-x).


[Home] [Search] [Index] This site maintained by unixhelp@hardrock.org