aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/install_install.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-08-16 19:06:18 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-08-16 19:06:18 +0000
commit068096531f297d188afea88190cd838ccae662cb (patch)
tree7109437c35b6fefaf83525969afbb720e314e9c6 /phpBB/install/install_install.php
parentda65cd13974a42fe5a551a0b66cb3f3a6db6dcf4 (diff)
downloadforums-068096531f297d188afea88190cd838ccae662cb.tar
forums-068096531f297d188afea88190cd838ccae662cb.tar.gz
forums-068096531f297d188afea88190cd838ccae662cb.tar.bz2
forums-068096531f297d188afea88190cd838ccae662cb.tar.xz
forums-068096531f297d188afea88190cd838ccae662cb.zip
the chmod change i already had within the changelog (by mistake). This should further secure writable directories and created files.
Installation need to be tested on different hosts. git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8763 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/install/install_install.php')
-rw-r--r--phpBB/install/install_install.php13
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');
}
}