|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #66414 Wrong access mode
Submitted: 2014-01-04 21:59 UTC Modified: 2014-01-05 07:06 UTC
From: wouter at wouterj dot nl Assigned: krakjoe (profile)
Status: Closed Package: Directory function related
PHP Version: Irrelevant OS: not windows
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: wouter at wouterj dot nl
New email:
PHP Version: OS:


 [2014-01-04 21:59 UTC] wouter at wouterj dot nl
From manual page:

Example #2 sets the access mode to 0, which means nobody can access it. It should use the default value (0777).

Test script:
$structure = './depth1/depth2/depth3/';

mkdir($structure, 0, true);

file_put_contents($structure.'/my-file.txt', 'hello world');

Expected result:
A file named 'my-file.txt' in './depth1/depth2/depth3/' with the content 'hello world' should be created

Actual result:
Warning: mkdir() [function.mkdir]: Permission denied in [...]


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-01-05 07:05 UTC]
Automatic comment from SVN on behalf of krakjoe
Log: fix #66414 bad mkdir example
 [2014-01-05 07:06 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: krakjoe
 [2014-01-05 07:06 UTC]
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at

 For Windows:
Thank you for the report, and for helping us make PHP better.

 [2020-02-07 06:08 UTC]
Automatic comment on behalf of krakjoe
Log: fix #66414 bad mkdir example
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Aug 04 23:01:24 2021 UTC