Whats UMASK?

April 11, 2009

UMASK is a UNIX environment variable which automatically sets file permission on newly created files. The UMASK variable can be confusing to use, because it does work as a mask. In other words, you set the permissions that you do not want in the UMASK. To calculate permissions which will result from specific UMASK values, subtract the UMASK from 666 for files and from 777 for directories.

If you want all files created with permissions of 666, set your UMASK to 000. Alternatively, if you want all files created with permissions of 000, set your UMASK to 666.

A reasonable value for UMASK is 022, which will cause files to be created with permissions of 644 (rw-r–r–) and directories to be created with permissions of 755 (rwxr-xr-x). A more secure value for UMASK is 066, which will cause files to be created with permissions of 600 (rw——-) and directories to be created with permissions of 700 (rwx——).

Entry Filed under: linux. Tags: .

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


My Profile


# Software Eng. # Worked with C,C++, JAVA and PHP. #Love to play with codes. # Mostly like to do programming with 'C'. # I am not a CODER, but a DEVELOPER.

Admin Panel..

Life Cycle

April 2009
S S M T W T F
« Dec   Jul »
 123
45678910
11121314151617
18192021222324
252627282930  

Clouds

cakephp codeIgniter desktop htaccess jscript linux mixed my words php regular expression

Just Posted

TOP R@TED

TaGs

cakephp codeIgniter desktop GP htaccess image upload installation jscript linux news password Personal Life php regular_Xpression script session validation

Archives

Top Posts

CoMmEnTs

Blog Stats

My Web Links

Web Links

RSS Xperts.PHP