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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC