Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 1

In a Unix or Linux operating system, umask is an enviromental variable that sets the file

permission for all files and directories. The umask variable works as a mask, and subtracts the
permissions you do not want the files and directories to have from the default permissions. The
default permissions are 666 (read and write for all users) for files and 777 (read, write, execute
for all users) for directories. Since the default values are inherently insecure, the umask variable
is used to create a more secure environment.

Instructions

• Open a Terminal Window. The terminal window will be found in the operating system's
main "Application" menu, under either "System Tools" or "Utilities". You will be
presented with a command prompt where you will type the following commands.

• Type the command "umask" to determine the umask value. The umask value will
usually be around "022."

• Subtract the umask value from "666" for files and "777" for directories. For instance:
666 - 022 = 644
777 - 022 = 755

• Determine the file permissions from the resulting values. The values are based on the
octal code for permissions which are "4" for read permissions, "2" for write permissions
and "1" for execute permissions. The value "644" for files gives the owner of the file
read and write permissions while the group and others only have read permissions. The
value 755 gives the owner of the directory read, write and execute permissions while
the group and others only have read and execute permissions

You might also like