RE: [PHP3] Re: [PHP4BETA] mkdir Bug?

From: Date: Thu, 22 Jul 1999 14:08:24 +0000
Subject: RE: [PHP3] Re: [PHP4BETA] mkdir Bug?
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-2523@lists.php.net to get a copy of this message
On Thu, 22 Jul 1999, Samuel Liddicott wrote: > -----Original Message----- > From: Stig Bakken [mailto:ssb@fast.no] > Sent: 22 July 1999 12:57 > To: John Coggeshall > Cc: Samuel Liddicott; Brian Moon; php; php4 > Subject: [PHP3] Re: [PHP4BETA] mkdir Bug? > > > The mode on your directory is affected by your current umask. It will end > up having (<mkdir-mode> and (not <umask>)). If you want to create one > that is publicly readable, do something like this: > > $oldumask = umask(0); > mkdir('mydir', 0777); // or even 01777 so you get the sticky bit set > umask($oldumask); > > This may be so, but it should not be. > UMASK is for calcuating the perms when no perms are supplied; when > permissions are supplied umask should not be used. Since PHP's mkdir function has its name from the mkdir system call, that uses umask, this is IMHO the only sensible semantics for PHP's mkdir as well. To do otherwise would just create confusion. - Stig

« previous php.version4 (#2523) next »