|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31573 sqlite_open create database file umask incorrect
Submitted: 2005-01-16 17:28 UTC Modified: 2005-01-16 18:20 UTC
From: hunreal+php dot bug dot report at gmail dot com Assigned:
Status: Not a bug Package: SQLite related
PHP Version: 5.0.3 OS: FreeBSD 4.11/5.3
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:
43 + 47 = ?
Subscribe to this entry?

 [2005-01-16 17:28 UTC] hunreal+php dot bug dot report at gmail dot com
The database file created by 0644 permission and not user setted.
And my php was not running in safe-more

Reproduce code:
$db=sqlite_open('db', 0666, $error);

Expected result:
-rw-r--r--   1 root  wheel          0 Jan 17 00:15 db


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-16 17:58 UTC]

The mode parameter specifies the mode of the file and is intended to be used to open the database in read-only mode. Presently, this parameter is ignored by the sqlite library. The default value for mode is the octal value 0666 and this is the recommended value to use if you need access to the errmessage parameter.

If you need to set the umask, set the umask.

 [2005-01-16 18:06 UTC] hunreal+php dot bug dot report at gmail dot com

problem is the same
-rw-r--r--   1 root  wheel          0 Jan 17 01:05 db
 [2005-01-16 18:20 UTC]
Consult the sqlite library developers if you feel this should be changed.
Not a PHP bug.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 01 15:01:30 2024 UTC