#31573 [Opn->Bgs]: sqlite_open create database file umask incorrect
| From: | wez@php.net | Date: | Sun, 16 Jan 2005 16:58:57 +0000 |
| Subject: | #31573 [Opn->Bgs]: sqlite_open create database file umask incorrect | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-72253@lists.php.net to get a copy of this message | ||
ID: 31573
Updated by: wez@php.net
Reported By: hunreal+php dot bug dot report at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: SQLite related
Operating System: FreeBSD 4.11/5.3
PHP Version: 5.0.3
New Comment:
From http://www.php.net/sqlite_open
"
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.
http://www.php.net/umask
Previous Comments:
------------------------------------------------------------------------
[2005-01-16 17:28:21] hunreal+php dot bug dot report at gmail dot com
Description:
------------
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);
?>
<?
$db=sqlite_open('db');
?>
Expected result:
----------------
-rw-r--r-- 1 root wheel 0 Jan 17 00:15 db
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31573&edit=1