umask

As Linux has the permission for all files and directories and each user can use a file according to the permissions assigned to him. This is increases the security feature of the Linux and make it more suitable for secure computing over the web.

Now when you create a new file or directory, the permissions you get depends on the value of what is known as the umask. Just simply type the umask at the command-line interface and notice the numeric masked value of the permissions:

#umask
0022
This number gives the values of the permission but in order to understand this you need to have the clear idea of the numeric value of the permissions. The first number (0) in the umask is currently unused. So this means the actual umask is 022.

Now if everyone has the permissions to your files and directory i.e read, write and execute so it corresponds to the number 7(r+w+x = 4+2+1). If you apply it to all the users than it corresponds to 777.

By convention the permission of 777 corresponds to the  umask of 000. But However, umask does not allow to configure execute(x=1) permissions on any file. Now if we again consider the 022 value it will correspond to the permission of 644(rw+w+w does"t provide execute permission), or rw-r--r--; this means the owner has the read and write permissions, the member of the group that own the file have read permissions, and all others users have read permissions.

Comments

0 Responses to "umask"

Post a Comment

 

Managing Shell And its Secrets

Subscribe To Get Update On Mobile

Subscribe
Get updates of latest post on your mobile free