|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23306 dba_open ignores umask()
Submitted: 2003-04-22 08:23 UTC Modified: 2003-04-28 11:46 UTC
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: alberty at neptunelabs dot de Assigned: helly (profile)
Status: No Feedback Package: DBM/DBA related
PHP Version: 4CVS-2003-04-22 (stable) OS: i686-pc-linux-gnu
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2003-04-22 08:23 UTC] alberty at neptunelabs dot de

dba_open() ignores the umask settings if you create a new database.

I think dba_open should also respect the umask settings, as well as fopen().




Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-22 17:08 UTC]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

Could you post a reproducing script that shows in what way fopen considers umask and dba does not?

But maybe you try dba_open with gdbm handler which allows a filemask as a forth parameter.
 [2003-04-28 11:46 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

 [2008-05-12 17:05 UTC] php at ronino dot de
I can confirm this bug and provide an example (Gentoo with PHP 
5.2.6_rc4 here):

$oldUmask = umask(0117);
$dbm = dba_popen("/some/file.dbm", "c");

For some handlers (tested: gdbm, qdbm), the file permissions always 
are 0640 or -rw-r----- no matter what umask is set.

Regards, Ronino
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sat Jul 20 05:01:25 2019 UTC