mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
change the way we do chmodd'ing. I know, my implementation really sucked... good we have motivated community members who point this out. ;) Thanks to faw for providing a way better function and for discussing and also abiding to our needs. :) LEW21 should maybe credited too... he gave the inspiration without knowing it.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8780 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -438,14 +438,13 @@ class install_install extends module
|
||||
if (!file_exists($phpbb_root_path . $dir))
|
||||
{
|
||||
@mkdir($phpbb_root_path . $dir, 0777);
|
||||
phpbb_chmod($phpbb_root_path . $dir, 'rwrite');
|
||||
phpbb_chmod($phpbb_root_path . $dir, CHMOD_READ | CHMOD_WRITE);
|
||||
}
|
||||
|
||||
// Now really check
|
||||
if (file_exists($phpbb_root_path . $dir) && is_dir($phpbb_root_path . $dir))
|
||||
{
|
||||
// Make writeable only for apache user
|
||||
phpbb_chmod($phpbb_root_path . $dir, 'rwrite');
|
||||
phpbb_chmod($phpbb_root_path . $dir, CHMOD_READ | CHMOD_WRITE);
|
||||
$exists = true;
|
||||
}
|
||||
|
||||
@@ -875,7 +874,7 @@ class install_install extends module
|
||||
}
|
||||
@fclose($fp);
|
||||
|
||||
phpbb_chmod($phpbb_root_path . 'cache/install_lock', 'write-all');
|
||||
@chmod($phpbb_root_path . 'cache/install_lock', 0777);
|
||||
|
||||
$load_extensions = implode(',', $load_extensions);
|
||||
|
||||
@@ -928,8 +927,8 @@ class install_install extends module
|
||||
|
||||
if ($written)
|
||||
{
|
||||
// Readable by apache user/group, not by any other means
|
||||
phpbb_chmod($phpbb_root_path . 'config.' . $phpEx, 'rread');
|
||||
// We may revert back to chmod() if we see problems with users not able to change their config.php file directly
|
||||
phpbb_chmod($phpbb_root_path . 'config.' . $phpEx, CHMOD_READ);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user