Re: mkdir() , making 'mode' parameter optional

From: Date: Thu, 10 Jan 2002 23:31:39 +0000
Subject: Re: mkdir() , making 'mode' parameter optional
References: 1 2 3  Groups: php.dev 
Request: Send a blank email to php-dev+get-76551@lists.php.net to get a copy of this message
At 00:02 11-1-2002, Markus Fischer shared with all of us:
On Thu, Jan 10, 2002 at 11:46:50PM +0100, Melvyn Sopacua wrote : Markus Fischer said at 22:41 10-1-2002:
Is there someone who would object modifying mkdir() so it only needs the dirname to create and mode is optonal and defaults to 0777 ?
defaults to php_value php_umask ?
    Pardon, can you elaborate?
An ini-setting (and thus apache directive), which specifies the umask for file/dir-creation. This would help especially in hosting environments, with less skilled users.
Same for 'touch' and fopen("w")? touch is now 600, so either align them or configurable.
    Where do you see this default value in the source ? I can't
    spot it.
Sorry - I confused two things: it's the default for move_uploaded_file. That could use an optional argument mode :-). Judging from the a quick testscript, the default for touch is indeed the umask of the user. In any case - a hardcoded 0777 isn't logical, apart from being less safe. __________________________________________ $ uname -a HumanBSD melvyn.sopacua.net 30.9-STABLE HumanBSD 30.9-STABLE #10: Mon 29 10:00:00 GMT 2000 melvyn@homecomp.sopacua.net:/usr/src/sys/compile/WEBMASTER hx86

« previous php.dev (#76551) next »