php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #214 mode for chmod is in decimal instead of octal
Submitted: 1998-03-30 16:51 UTC Modified: 1998-03-30 17:25 UTC
From: leon dot atkinson at clearink dot com Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 3.0 Latest CVS OS: Solaris
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:
MUST BE VALID
Solve the problem:
20 - 3 = ?
Subscribe to this entry?

 
 [1998-03-30 16:51 UTC] leon dot atkinson at clearink dot com
chmod("foo", 777) treats 777 as a decimal number, which
forces you to do octal-decimal conversion.

It's doing it with mkdir() as well.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-03-30 17:25 UTC] jim
This is the correct behavior. If you want it

to operate on an octal number, give it an

octal number:



chmod("foo", 0777);


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 10:01:31 2024 UTC