Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

umask question



In addition to what has been said before, the execute bit is never set when 
you create a file other than a directory. This is why you must always set 
the execute bit for a shell script. When you create a directory the execute 
bit is set. The linker will also set the execute bits. Normally, you use 
the umask command (normally a shell builtin) to restrict permissions. This 
is why it is an inverse and xored with the default permissions.
For example, if you have a umask of 333, when you create a directory, the 
permissions will be 444, because you are turning off the execute and write 
bits.

So, a umask 000 is simply a nop. 
David Kramer wrote:
> (this is on freebsd if it matters)
> 
> If I "umask 0" and create a file, that file is coming out 666 instead of 
> 777.  Am I missing something?
-- 
Jerry Feldman <gaf at blu.org>
Boston Linux and Unix user group
http://www.blu.org PGP key id:C5061EA9
PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9






BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org