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



On Fri, Jul 12, 2002 at 11:24:14AM -0400, 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?

Creating it how - from a shell, in a program? With system or stdio calls?

The mode of a newly created file is set (and modified by the umask)
in the low-level creat(2) or open(2) system call. Most applications -
including anything using the C library's fopen(3) call - don't set the
execute bits at the time the file is created. So your umask setting
allows the execute bits to be set at file creation if the app requests
it... but the app still has to request it.

Nathan Meyers
nmeyers at javalinux.net




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