Re: mkdir() , making 'mode' parameter optional
| From: | Markus Fischer | Date: | Fri, 11 Jan 2002 04:22:54 +0000 |
| Subject: | Re: mkdir() , making 'mode' parameter optional | ||
| References: | 1 2 3 4 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-76574@lists.php.net to get a copy of this message | ||
On Fri, Jan 11, 2002 at 12:31:39AM +0100, Melvyn Sopacua wrote :
> 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.
I wasn't talking about adding 'a new feature' or so.
> >> 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.
It makes totally sense because it only relies on the umask()
being set.
--
Please always Cc to me when replying to me on the lists.