php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
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);
umask($oldumask);
?>

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

Patches

Pull Requests

History

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

<?PHP
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] darkelder@php.net
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] sniper@php.net
user error.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jan 02 12:01:29 2025 UTC