|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17229 Permissions set incorrectly on newly created directories.
Submitted: 2002-05-14 20:01 UTC Modified: 2002-09-11 11:07 UTC
From: tch at unixprogramming dot net Assigned:
Status: Not a bug Package: *Directory/Filesystem functions
PHP Version: 4.2.1 OS: OSX , Maybe More
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
31 + 15 = ?
Subscribe to this entry?

 [2002-05-14 20:01 UTC] tch at unixprogramming dot net
$basedir = "./mkdirtests/";
$newdir = "foo";
$fullpath = $basedir . $newdir;
$lscmd = "/bin/ls -al $basedir";

<p>Making directory "./foo" with a umask of 0000<br>
$oldumask = umask(0000);
mkdir ($fullpath, 0700);

<p>Listing <?="$lscmd"?>:<br>
<? passthru( "$lscmd"); ?>


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-15 14:36 UTC]
What permissions are set by PHP on the directory and what do you expect?
 [2002-06-09 01:13 UTC]
I have the same problem. mkdir second param doesnt work. 

mkdir ("some",0777);

at posix, sure, will create "some" directory without 0777 chmod. So, I need do a chmod("some",0777).

 [2002-06-09 01:19 UTC]
Sorry for my comment. I take a look on my umask and undestand why my directory isn't created at 0777.
 [2002-09-11 11:07 UTC]
user error.

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun Dec 04 00:05:52 2022 UTC