Why is used umask ?

Posted by fabrizioM on Stack Overflow See other posts from Stack Overflow or by fabrizioM
Published on 2010-05-06T10:23:34Z Indexed on 2010/05/06 10:28 UTC
Read the original article Hit count: 192

Filed under:
|
|

I am reading some source code and I found at the very begin of the main routine this statement:

umask(077);

What could be the reason for that?

The man page (man 2 umask) states:

umask -- set file creation mode mask

This clearing allows each user to restrict the default access to his files

But is not clear to me why would do that? as a shortcut ?

© Stack Overflow or respective owner

Related posts about c++

Related posts about c