From 4cd06da7dad43b68d621ef64343e15d4d81f2552 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Wed, 29 Apr 2015 11:28:56 +0000 Subject: [PATCH] dblayer : sqlite : chmod 0666 only if the file exists git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2098 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- dblayer.php | 1 + 1 file changed, 1 insertion(+) diff --git a/dblayer.php b/dblayer.php index 5528b38..3ad8ccb 100644 --- a/dblayer.php +++ b/dblayer.php @@ -113,6 +113,7 @@ class dblayer extends PDO "The SQLite database file is write protected"), 500); if (function_exists ("posix_getuid") && + file_exists ($file) && fileowner ($file) === posix_getuid ()) chmod ($file, 0666); try