|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13299 mkdir([DIR], 0777); wont set file permission
Submitted: 2001-09-14 07:49 UTC Modified: 2001-09-14 12:17 UTC
From: designs at minds-eye-media dot co dot uk Assigned:
Status: Closed Package: Directory function related
PHP Version: 4.0.6 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
18 + 30 = ?
Subscribe to this entry?

 [2001-09-14 07:49 UTC] designs at minds-eye-media dot co dot uk
When adding directories the line

mkdir([DIRNAME]. 0777);

will not create a directory with permissions other than root. Attempted using command with umask(0000); but made no difference.

PHP is denied permission to set these privileges. How is this fixed?

PHP 4.0.6 was compiled on my Raq3 as an Apache module.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-14 08:10 UTC]
sticky bits set on the directory you try to create it in ?
 [2001-09-14 11:01 UTC] designs at minds-eye-media dot co dot uk
sticky bit of directory I try to create it in are set are set to '2 joey' as default. The directory created by PHP sets a sticky bit of '2 httpd' with no permission other than root.

so you think it's a sticky problem then?
 [2001-09-14 12:17 UTC] designs at minds-eye-media dot co dot uk
Problem solved.

Clearly not a bug as it can be alleviated by setting the sticky with mkdir([DIR], 01777);

However, unusual as this workaround has not been needed on other systems we use. Thanks for the quick turnaround.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Sep 28 13:03:38 2021 UTC