|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36630 umask is not being restored when each request is finished.
Submitted: 2006-03-06 15:08 UTC Modified: 2006-03-06 15:28 UTC
From: sorin at intersol dot ro Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 5.1.2 OS: Fedora Core 4
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:
29 - 14 = ?
Subscribe to this entry?

 [2006-03-06 15:08 UTC] sorin at intersol dot ro
umask does not restore the initial umask on exit, affecting other processes running after umask on the same server (svn, other scripts)
Same code works fine on the same system with php 5.0.4

Reproduce code:
<?=echo sprintf("%04o",umask(0111));?>

Expected result:
Always the same umask (default, probably 0022)

Actual result:
alternatively 0022 or 0111 until all threads ran the script at least once. Only 0111 after that...


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-06 15:28 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Apr 01 20:03:35 2023 UTC