mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
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
This commit is contained in:
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user