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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: alberty at neptunelabs dot de
New email:
PHP Version: OS:

 

 [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: Tue Apr 23 17:01:31 2024 UTC