Umask

Protecting your Linux box

Umask

Postby Imran.Plus » Wed Dec 18, 2002 9:18 pm

Dear Friends,
What is umask, how it work and also what is it main function
Imran.Plus
Cadet
 
Posts: 12
Joined: Fri Nov 22, 2002 11:53 am
Website: http://www.plus.com.pk
WLM: imranchandio56@hotmail.com
Location: Multan

Postby Guest » Fri Dec 20, 2002 8:45 am

Guest
 

Postby kernel-trap » Thu Dec 25, 2003 3:45 pm

umask is basically permission given by system when creating file and directory

e.g

umask 022

file permission created 755

777 -022 = 755
kernel-trap
Havaldaar
 
Posts: 105
Joined: Thu Dec 25, 2003 2:31 pm

Re:

Postby LinuxFreaK » Fri Dec 26, 2003 7:58 pm

Dear Imran.Plus,
Salam,

umask sets the umask to mask & 0777.
The umask is used by open(2) to set initial file permissions on a newly-created file. Specifically, permissions in the umask are turned off from the mode argument to open(2) (so, for example, the common umask default value of 022 results in new files being created with permissions 0666 & ~022 = 0644 = rw-r--r-- in the usual case where the mode is specified as 0666).

Best Regards.
Farrukh Ahmed
LinuxFreaK
Site Admin
 
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
ICQ: 82075802
Website: http://www.linuxpakistan.net/wiki/index.php?pagename=LinuxFreak
WLM: f4fahmed@hotmail.com
Yahoo Messenger: f4fahmed@yahoo.com
AOL: linuxpakistan@aol.com
Location: Karachi


Return to “%s” Security

Who is online

Users browsing this forum: No registered users and 1 guest

cron