Why a umask of 0027 creates files like 0640

The User Mask (umask) can be managed with the command umask. A umask is the reverse value of the octal permission set that files and directories are created with.

So, a umask of 0777 creates files with an octal permission value of 0000; no permissions to read, write or execute.

But; there is a strange thing about the umask; it never allows to make files executable. Here is a demonstration of this "flaw"/"security feature".

$ umask 0027
$ touch me
$ ls -l me | awk '{print $1}'
-rw-r-----

I would have expected 750, instead 640 is produced. This is default security behaviour of UNIX/Linux.

Comments

Good tip. Your website is

Good tip. Your website is truly helpful for explanation this quite difficult for newbie unix. Thanks
Check out for good writing tips here www.123termpapers.com

Now, we are learning about

Now, we are learning about umask created files. The details are clearly written in this http://xessayontime.com/ website. So everyone must read the following steps and reviews from this blog.

Now, I finally understand how

Now, I finally understand how this process works. Thanks to this brilliant information here. - Dennis Wong YOR Health

To work out the file

To work out the file permissions from a umask you subtracted the umask from 777 for directories or from 666 for files.

Your file for example:
umask = 027
777-027 = 750 Directory permissions
666-027 = 640 File permissions

Nice explanation. I

Nice explanation.

I understood clearly by this example.

Thanq.

About Consultancy Articles Contact




References Red Hat Certified Architect By Robert de Bock Robert de Bock
Curriculum Vitae By Fred Clausen +31 6 14 39 58 72
By Nelson Manning [email protected]