|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2013-10-01 09:44 UTC] cmfcmf dot flach at gmail dot com
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.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 18:00:01 2025 UTC |
I get the same on PHP 5.5.3. chmod('test', 0777) then transforms the directory to the right chmod.