|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #79915 Explanation about umask parameter
Submitted: 2020-07-30 11:11 UTC Modified: 2020-07-30 18:39 UTC
From: petra dot bertova at gmail dot com Assigned:
Status: Open Package: Filesystem function related
PHP Version: Irrelevant OS: ubuntu
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 — but make sure to vote on the bug!
Your email address:
Solve the problem:
27 - 16 = ?
Subscribe to this entry?

 [2020-07-30 11:11 UTC] petra dot bertova at gmail dot com
From manual page:
Umask function seems to accept parameter in reverse binary code.
Full access is not umask(0777), but umask(0000)
-rwxrwx--- is not umask(0770), but umask(0007)
-rwxrwxr-x is not umask(0775), but umask(0003)

Please, update documentation and add more examples.

Actual result:
When I write 
I have no permissions to a directory/file

When I write 
I have -rwxrwxr-x permissions to a directory/file


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-07-30 18:39 UTC]
-Summary: umask parameter +Summary: Explanation about umask parameter -Package: Unknown/Other Function +Package: Filesystem function related
 [2020-07-30 18:39 UTC]
As stated in the top comment, umask is about revoking permissions, not granting them. This is how the standard umask(2) works.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Oct 30 06:01:28 2020 UTC