php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #11046 mkdir doesnt sets permissions
Submitted: 2001-05-23 05:19 UTC Modified: 2001-07-07 23:51 UTC
From: javieracastro at hotmail dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.0.4pl1 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: javieracastro at hotmail dot com
New email:
PHP Version: OS:

 

 [2001-05-23 05:19 UTC] javieracastro at hotmail dot com
mkdir("test",0777)

the directory is dwrx-rx-rx, not dwrxwrxwrx :)

why?

or it is my server with some rare php config?

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-23 05:32 UTC] sniper@php.net
Your umask setting is most likely the cause.
Please try this instead:

<?php

$oldumask = umask(0); 
mkdir('mydir', 0777); 
umask($oldumask);

?>
 [2001-06-27 02:24 UTC] danbeck@php.net
This is not a documentation problem.
 [2001-06-27 12:02 UTC] sniper@php.net
This is documentation problem. It should be told on the mkdir() docs that the umask has an affect on the permissions of the created directory.

 [2001-07-07 23:51 UTC] jimw@php.net
noted in documentation.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 03:01:27 2025 UTC