|  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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: tch at unixprogramming dot net
New email:
PHP Version: OS:


 [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-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 15 09:01:28 2024 UTC