Doc #66414 [NEW]: Wrong access mode
| From: | wouter at wouterj dot nl | Date: | Sat, 04 Jan 2014 21:59:27 +0000 |
| Subject: | Doc #66414 [NEW]: Wrong access mode | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-10807@lists.php.net to get a copy of this message | ||
From: wouter at wouterj dot nl
Operating system: not windows
PHP version: Irrelevant
Package: Directory function related
Bug Type: Documentation Problem
Bug description:Wrong access mode
Description:
------------
---
From manual page: http://www.php.net/function.mkdir
---
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 [...]
--
Edit bug report at https://bugs.php.net/bug.php?id=66414&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66414&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66414&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66414&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=66414&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=66414&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=66414&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=66414&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=66414&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=66414&r=support
Expected behavior: https://bugs.php.net/fix.php?id=66414&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=66414&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=66414&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=66414&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66414&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=66414&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=66414&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=66414&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=66414&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=66414&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=66414&r=mysqlcfg