php.net |  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
Votes:1
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
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:
MUST BE VALID
Solve the problem:
10 + 26 = ?
Subscribe to this entry?

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

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().

Regards,

Steve

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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

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] sniper@php.net
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");
umask($oldUmask);

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 01:01:28 2024 UTC