From:             cmfcmf dot flach at gmail dot com
Operating system: Linux/Ubuntu 13.4
PHP version:      Irrelevant
Package:          Directory function related
Bug Type:         Bug
Bug description:mkdir creates folders with wrong permissions

Description:
------------
Creating a directory using mkdir() does not respect the permissions given.

Test script:
---------------
<?php

// Create a folder with 0777 permissions.
mkdir('test', 0777);

// Should be 0777, but is 0755.
echo substr(sprintf('%o', fileperms('test')), -4);

Expected result:
----------------
I expect the folder to be created with 0777 permission.

Actual result:
--------------
The folder is created with 0755 permission.

-- 
Edit bug report at https://bugs.php.net/bug.php?id=65796&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=65796&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=65796&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=65796&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=65796&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=65796&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=65796&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=65796&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=65796&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=65796&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=65796&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=65796&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=65796&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=65796&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65796&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=65796&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=65796&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=65796&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65796&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=65796&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=65796&r=mysqlcfg

Reply via email to