diff options
Diffstat (limited to 'phpBB/install/install_install.php')
-rw-r--r-- | phpBB/install/install_install.php | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 0bf42f85f4..7959552413 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -438,16 +438,14 @@ class install_install extends module if (!file_exists($phpbb_root_path . $dir)) { @mkdir($phpbb_root_path . $dir, 0777); - @chmod($phpbb_root_path . $dir, 0777); + phpbb_chmod($phpbb_root_path . $dir, 'rwrite'); } // Now really check if (file_exists($phpbb_root_path . $dir) && is_dir($phpbb_root_path . $dir)) { - if (!@is_writable($phpbb_root_path . $dir)) - { - @chmod($phpbb_root_path . $dir, 0777); - } + // Make writeable only for apache user + phpbb_chmod($phpbb_root_path . $dir, 'rwrite'); $exists = true; } @@ -877,7 +875,7 @@ class install_install extends module } @fclose($fp); - @chmod($phpbb_root_path . 'cache/install_lock', 0666); + phpbb_chmod($phpbb_root_path . 'cache/install_lock', 'write-all'); $load_extensions = implode(',', $load_extensions); @@ -930,7 +928,8 @@ class install_install extends module if ($written) { - @chmod($phpbb_root_path . 'config.' . $phpEx, 0644); + // Readable by apache user/group, not by any other means + phpbb_chmod($phpbb_root_path . 'config.' . $phpEx, 'rread'); } } |