|  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
 [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-2018 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC