Dieser Commit ist enthalten in:
o.pinke 2020-09-01 15:23:56 +02:00
Ursprung 0feff6b9f5
Commit b6fcfc7f13
3 geänderte Dateien mit 303 neuen und 364 gelöschten Zeilen

Datei anzeigen

@ -1,4 +1,5 @@
<?php
/**
* Project:
* Contenido Content Management System
@ -26,24 +27,24 @@
* }}
*
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
define("C_PREDICT_SUFFICIENT", 1);
define("C_PREDICT_NOTPREDICTABLE", 2);
define("C_PREDICT_CHANGEPERM_SAMEOWNER", 3);
define("C_PREDICT_CHANGEPERM_SAMEGROUP", 4);
define("C_PREDICT_CHANGEPERM_OTHERS", 5);
define("C_PREDICT_CHANGEUSER", 6);
define("C_PREDICT_CHANGEGROUP", 7);
define("C_PREDICT_WINDOWS", 8);
define("E_BASEDIR_NORESTRICTION", 1);
define("E_BASEDIR_DOTRESTRICTION", 2);
define("E_BASEDIR_RESTRICTIONSUFFICIENT", 3);
define("E_BASEDIR_INCOMPATIBLE", 4);
define("C_PREDICT_SUFFICIENT", 1);
define("C_PREDICT_NOTPREDICTABLE", 2);
define("C_PREDICT_CHANGEPERM_SAMEOWNER", 3);
define("C_PREDICT_CHANGEPERM_SAMEGROUP", 4);
define("C_PREDICT_CHANGEPERM_OTHERS", 5);
define("C_PREDICT_CHANGEUSER", 6);
define("C_PREDICT_CHANGEGROUP", 7);
define("C_PREDICT_WINDOWS", 8);
define("E_BASEDIR_NORESTRICTION", 1);
define("E_BASEDIR_DOTRESTRICTION", 2);
define("E_BASEDIR_RESTRICTIONSUFFICIENT", 3);
define("E_BASEDIR_INCOMPATIBLE", 4);
/**
* isWriteable:
@ -55,19 +56,17 @@ define("E_BASEDIR_INCOMPATIBLE", 4);
* @param $file string Path to the file, accepts absolute and relative files
* @return boolean true if the file exists and is writeable, false otherwise
*/
function isWriteable ($file)
{
clearstatcache();
if (!file_exists($file))
{
return false;
}
function isWriteable($file) {
clearstatcache();
if (!file_exists($file)) {
return false;
}
$bStatus = is_writable($file);
/* PHP 4.0.4 workaround */
settype($bStatus, "boolean");
$bStatus = is_writable($file);
/* PHP 4.0.4 workaround */
settype($bStatus, "boolean");
return $bStatus;
return $bStatus;
}
/**
@ -77,28 +76,23 @@ function isWriteable ($file)
* @param $file string Path to the file, accepts absolute and relative files
* @return boolean true if the file exists and is readable, false otherwise
*/
function isReadable ($file)
{
return is_readable($file);
function isReadable($file) {
return is_readable($file);
}
function canReadFile ($sFilename)
{
if (isReadable(dirname($sFilename)))
{
if (isReadable($sFilename))
{
$fp = fopen($sFilename, "r");
fclose($fp);
function canReadFile($sFilename) {
if (isReadable(dirname($sFilename))) {
if (isReadable($sFilename)) {
$fp = fopen($sFilename, "r");
fclose($fp);
return true;
}
}
return false;
return true;
}
}
return false;
}
function canWriteFile ($sFilename)
{
function canWriteFile($sFilename) {
#check dir perms, create a new file read it and delete it
if (is_dir($sFilename)) {
@ -106,14 +100,14 @@ function canWriteFile ($sFilename)
$i = 0;
#try to find a random filename for write test, which does not exist
while (file_exists($sRandFilenamePath) && $i < 100) {
$sRandFilename = 'con_test'.rand(0,1000000000).'con_test';
while (file_exists($sRandFilenamePath) && $i < 100) {
$sRandFilename = 'con_test' . rand(0, 1000000000) . 'con_test';
$sRandFilenamePath = '';
if ($sFilename{strlen($sFilename)-1} == '/') {
$sRandFilenamePath = $sFilename.$sRandFilename;
if ($sFilename[strlen($sFilename) - 1] == '/') {
$sRandFilenamePath = $sFilename . $sRandFilename;
} else {
$sRandFilenamePath = $sFilename.'/'.$sRandFilename;
$sRandFilenamePath = $sFilename . '/' . $sRandFilename;
}
$i++;
@ -125,9 +119,9 @@ function canWriteFile ($sFilename)
}
/* Ignore errors in case isWriteable() returns
* a wrong information
*/
$fp = @fopen($sRandFilenamePath, "w");
* a wrong information
*/
$fp = @fopen($sRandFilenamePath, "w");
if ($fp) {
@fclose($fp);
unlink($sRandFilenamePath);
@ -137,235 +131,204 @@ function canWriteFile ($sFilename)
}
}
if (isWriteable(dirname($sFilename)))
{
if (file_exists($sFilename))
{
if (!isWriteable($sFilename))
{
return false;
} else {
return true;
}
}
if (isWriteable(dirname($sFilename))) {
if (file_exists($sFilename)) {
if (!isWriteable($sFilename)) {
return false;
} else {
return true;
}
}
/* Ignore errors in case isWriteable() returns
* a wrong information
*/
$fp = @fopen($sFilename, "w");
@fclose($fp);
/* Ignore errors in case isWriteable() returns
* a wrong information
*/
$fp = @fopen($sFilename, "w");
@fclose($fp);
if (file_exists($sFilename))
{
@unlink($sFilename);
return true;
} else {
return false;
}
} else {
if (file_exists($sFilename))
{
if (!isWriteable($sFilename))
{
return false;
} else {
return true;
}
}
}
if (file_exists($sFilename)) {
@unlink($sFilename);
return true;
} else {
return false;
}
} else {
if (file_exists($sFilename)) {
if (!isWriteable($sFilename)) {
return false;
} else {
return true;
}
}
}
}
function canDeleteFile ($sFilename)
{
if (isWriteable($sFilename))
{
unlink($sFilename);
function canDeleteFile($sFilename) {
if (isWriteable($sFilename)) {
unlink($sFilename);
if (file_exists($sFilename))
{
return false;
} else {
return true;
}
} else {
return false;
}
if (file_exists($sFilename)) {
return false;
} else {
return true;
}
} else {
return false;
}
}
function getFileInfo ($sFilename)
{
if (!file_exists($sFilename))
{
return false;
}
function getFileInfo($sFilename) {
if (!file_exists($sFilename)) {
return false;
}
$oiFilePermissions = fileperms($sFilename);
$oiFilePermissions = fileperms($sFilename);
if ($oiFilePermissions === false)
{
return false;
}
if ($oiFilePermissions === false) {
return false;
}
switch (true)
{
case (($oiFilePermissions & 0xC000) == 0xC000):
$info = 's';
$type = "socket";
break;
case (($oiFilePermissions & 0xA000) == 0xA000):
$info = 'l';
$type = "symbolic link";
break;
case (($oiFilePermissions & 0x8000) == 0x8000):
$info = '-';
$type = "regular file";
break;
case (($oiFilePermissions & 0x6000) == 0x6000):
$info = 'b';
$type = "block special";
break;
case (($oiFilePermissions & 0x4000) == 0x4000):
$info = 'd';
$type = "directory";
break;
case (($oiFilePermissions & 0x2000) == 0x2000):
$info = 'c';
$type = "character special";
break;
case (($oiFilePermissions & 0x1000) == 0x1000):
$info = 'p';
$type = "FIFO pipe";
break;
default:
$info = "u";
$type = "Unknown";
break;
}
switch (true) {
case (($oiFilePermissions & 0xC000) == 0xC000):
$info = 's';
$type = "socket";
break;
case (($oiFilePermissions & 0xA000) == 0xA000):
$info = 'l';
$type = "symbolic link";
break;
case (($oiFilePermissions & 0x8000) == 0x8000):
$info = '-';
$type = "regular file";
break;
case (($oiFilePermissions & 0x6000) == 0x6000):
$info = 'b';
$type = "block special";
break;
case (($oiFilePermissions & 0x4000) == 0x4000):
$info = 'd';
$type = "directory";
break;
case (($oiFilePermissions & 0x2000) == 0x2000):
$info = 'c';
$type = "character special";
break;
case (($oiFilePermissions & 0x1000) == 0x1000):
$info = 'p';
$type = "FIFO pipe";
break;
default:
$info = "u";
$type = "Unknown";
break;
}
$aFileinfo = array();
$aFileinfo["info"] = $info;
$aFileinfo["type"] = $type;
$aFileinfo["owner"]["read"] = ($oiFilePermissions & 0x0100) ? true : false;
$aFileinfo["owner"]["write"] = ($oiFilePermissions & 0x0080) ? true : false;
$aFileinfo["group"]["read"] = ($oiFilePermissions & 0x0020) ? true : false;
$aFileinfo["group"]["write"] = ($oiFilePermissions & 0x0010) ? true : false;
$aFileinfo["others"]["read"] = ($oiFilePermissions & 0x0004) ? true : false;
$aFileinfo["others"]["write"] = ($oiFilePermissions & 0x0002) ? true : false;
$aFileinfo["owner"]["id"] = fileowner($sFilename);
$aFileinfo["group"]["id"] = filegroup($sFilename);
return ($aFileinfo);
$aFileinfo = array();
$aFileinfo["info"] = $info;
$aFileinfo["type"] = $type;
$aFileinfo["owner"]["read"] = ($oiFilePermissions & 0x0100) ? true : false;
$aFileinfo["owner"]["write"] = ($oiFilePermissions & 0x0080) ? true : false;
$aFileinfo["group"]["read"] = ($oiFilePermissions & 0x0020) ? true : false;
$aFileinfo["group"]["write"] = ($oiFilePermissions & 0x0010) ? true : false;
$aFileinfo["others"]["read"] = ($oiFilePermissions & 0x0004) ? true : false;
$aFileinfo["others"]["write"] = ($oiFilePermissions & 0x0002) ? true : false;
$aFileinfo["owner"]["id"] = fileowner($sFilename);
$aFileinfo["group"]["id"] = filegroup($sFilename);
return ($aFileinfo);
}
function checkOpenBasedirCompatibility ()
{
$value = getPHPIniSetting("open_basedir");
function checkOpenBasedirCompatibility() {
$value = getPHPIniSetting("open_basedir");
if (isWindows())
{
$aBasedirEntries = explode(";", $value);
} else {
$aBasedirEntries = explode(":", $value);
}
if (isWindows()) {
$aBasedirEntries = explode(";", $value);
} else {
$aBasedirEntries = explode(":", $value);
}
if (count($aBasedirEntries) == 1 && $aBasedirEntries[0] == $value)
{
return E_BASEDIR_NORESTRICTION;
}
if (count($aBasedirEntries) == 1 && $aBasedirEntries[0] == $value) {
return E_BASEDIR_NORESTRICTION;
}
if (in_array(".", $aBasedirEntries) && count($aBasedirEntries) == 1)
{
return E_BASEDIR_DOTRESTRICTION;
}
if (in_array(".", $aBasedirEntries) && count($aBasedirEntries) == 1) {
return E_BASEDIR_DOTRESTRICTION;
}
$sCurrentDirectory = getcwd();
$sCurrentDirectory = getcwd();
foreach ($aBasedirEntries as $entry)
{
if (stristr($sCurrentDirectory, $entry))
{
return E_BASEDIR_RESTRICTIONSUFFICIENT;
}
}
foreach ($aBasedirEntries as $entry) {
if (stristr($sCurrentDirectory, $entry)) {
return E_BASEDIR_RESTRICTIONSUFFICIENT;
}
}
return E_BASEDIR_INCOMPATIBLE;
return E_BASEDIR_INCOMPATIBLE;
}
function predictCorrectFilepermissions ($file)
{
/* Check if the system is a windows system. If yes,
* we can't predict anything.
*/
if (isWindows())
{
return C_PREDICT_WINDOWS;
}
function predictCorrectFilepermissions($file) {
/* Check if the system is a windows system. If yes,
* we can't predict anything.
*/
if (isWindows()) {
return C_PREDICT_WINDOWS;
}
/* Check if the file is read- and writeable. If yes, we don't need
* to do any further checks.
*/
if (isWriteable($file) && isReadable($file))
{
return C_PREDICT_SUFFICIENT;
}
/* Check if the file is read- and writeable. If yes, we don't need
* to do any further checks.
*/
if (isWriteable($file) && isReadable($file)) {
return C_PREDICT_SUFFICIENT;
}
$iServerUID = getServerUID();
$iServerUID = getServerUID();
/*
* If we can't find out the web server UID, we cannot
* predict the correct mask.
*/
if ($iServerUID === false)
{
return C_PREDICT_NOTPREDICTABLE;
}
/*
* If we can't find out the web server UID, we cannot
* predict the correct mask.
*/
if ($iServerUID === false) {
return C_PREDICT_NOTPREDICTABLE;
}
$iServerGID = getServerGID();
$iServerGID = getServerGID();
/*
* If we can't find out the web server GID, we cannot
* predict the correct mask.
*/
if ($iServerGID === false)
{
return C_PREDICT_NOTPREDICTABLE;
}
/*
* If we can't find out the web server GID, we cannot
* predict the correct mask.
*/
if ($iServerGID === false) {
return C_PREDICT_NOTPREDICTABLE;
}
$aFilePermissions = getFileInfo($file);
$aFilePermissions = getFileInfo($file);
if (getSafeModeStatus())
{
/* SAFE-Mode related checks */
if ($iServerUID == $aFilePermissions["owner"]["id"])
{
return C_PREDICT_CHANGEPERM_SAMEOWNER;
}
if (getSafeModeStatus()) {
/* SAFE-Mode related checks */
if ($iServerUID == $aFilePermissions["owner"]["id"]) {
return C_PREDICT_CHANGEPERM_SAMEOWNER;
}
if (getSafeModeGidStatus())
{
/* SAFE-Mode GID related checks */
if ($iServerGID == $aFilePermissions["group"]["id"])
{
return C_PREDICT_CHANGEPERM_SAMEGROUP;
}
if (getSafeModeGidStatus()) {
/* SAFE-Mode GID related checks */
if ($iServerGID == $aFilePermissions["group"]["id"]) {
return C_PREDICT_CHANGEPERM_SAMEGROUP;
}
return C_PREDICT_CHANGEGROUP;
}
return C_PREDICT_CHANGEGROUP;
}
} else {
/* Regular checks */
if ($iServerUID == $aFilePermissions["owner"]["id"]) {
return C_PREDICT_CHANGEPERM_SAMEOWNER;
}
} else {
/* Regular checks */
if ($iServerGID == $aFilePermissions["group"]["id"]) {
return C_PREDICT_CHANGEPERM_SAMEGROUP;
}
if ($iServerUID == $aFilePermissions["owner"]["id"])
{
return C_PREDICT_CHANGEPERM_SAMEOWNER;
}
if ($iServerGID == $aFilePermissions["group"]["id"])
{
return C_PREDICT_CHANGEPERM_SAMEGROUP;
}
return C_PREDICT_CHANGEPERM_OTHERS;
}
return C_PREDICT_CHANGEPERM_OTHERS;
}
}
?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php
/**
* Project:
* Contenido Content Management System
@ -27,15 +28,14 @@
* }}
*
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
define("E_EXTENSION_AVAILABLE", 1);
define("E_EXTENSION_UNAVAILABLE", 2);
define("E_EXTENSION_CANTCHECK", 3);
define("E_EXTENSION_AVAILABLE", 1);
define("E_EXTENSION_UNAVAILABLE", 2);
define("E_EXTENSION_CANTCHECK", 3);
/**
* getPHPIniSetting ($setting)
@ -44,21 +44,19 @@ define("E_EXTENSION_CANTCHECK", 3);
* Wrapper to avoid warnings if ini_get is in the
* disable_functions directive.
*/
function getPHPIniSetting ($setting)
{
/* Avoid errors if ini_get is in the disable_functions directive */
$value = @ini_get($setting);
return $value;
function getPHPIniSetting($setting) {
/* Avoid errors if ini_get is in the disable_functions directive */
$value = @ini_get($setting);
return $value;
}
/**
* canPHPurlfopen: Checks if PHP is able to use
* allow_url_fopen.
*/
function canPHPurlfopen ()
{
return getPHPIniSetting("allow_url_fopen");
function canPHPurlfopen() {
return getPHPIniSetting("allow_url_fopen");
}
/**
@ -69,81 +67,67 @@ function canPHPurlfopen ()
* Uses the PHP configuration value y2k_compilance which
* is available in all PHP4 versions.
*/
function checkPHPiniget ()
{
$value = @ini_get("y2k_compliance");
if ($value === NULL)
{
return false;
} else {
return true;
}
function checkPHPiniget() {
$value = @ini_get("y2k_compliance");
if ($value === NULL) {
return false;
} else {
return true;
}
}
function getPHPDisplayErrorSetting ()
{
return getPHPIniSetting("display_errors");
function getPHPDisplayErrorSetting() {
return getPHPIniSetting("display_errors");
}
function getPHPFileUploadSetting ()
{
return getPHPIniSetting("file_uploads");
function getPHPFileUploadSetting() {
return getPHPIniSetting("file_uploads");
}
function getPHPGPCOrder ()
{
return getPHPIniSetting("gpc_order");
function getPHPGPCOrder() {
return getPHPIniSetting("gpc_order");
}
function getPHPMagicQuotesGPC ()
{
return getPHPIniSetting("magic_quotes_gpc");
function getPHPMagicQuotesGPC() {
return getPHPIniSetting("magic_quotes_gpc");
}
function getPHPMagicQuotesRuntime ()
{
return getPHPIniSetting("magic_quotes_runtime");
function getPHPMagicQuotesRuntime() {
return getPHPIniSetting("magic_quotes_runtime");
}
function getPHPMagicQuotesSybase ()
{
return getPHPIniSetting("magic_quotes_sybase");
function getPHPMagicQuotesSybase() {
return getPHPIniSetting("magic_quotes_sybase");
}
function getPHPMaxExecutionTime ()
{
return getPHPIniSetting("max_execution_time");
function getPHPMaxExecutionTime() {
return getPHPIniSetting("max_execution_time");
}
function getPHPOpenBasedirSetting ()
{
return getPHPIniSetting("open_basedir");
function getPHPOpenBasedirSetting() {
return getPHPIniSetting("open_basedir");
}
function getPHPMaxPostSize ()
{
return getPHPIniSetting("post_max_size");
function getPHPMaxPostSize() {
return getPHPIniSetting("post_max_size");
}
function checkPHPSQLSafeMode ()
{
return getPHPIniSetting("sql.safe_mode");
function checkPHPSQLSafeMode() {
return getPHPIniSetting("sql.safe_mode");
}
function checkPHPUploadMaxFilesize ()
{
return getPHPIniSetting("upload_max_filesize");
function checkPHPUploadMaxFilesize() {
return getPHPIniSetting("upload_max_filesize");
}
function return_bytes($val) {
if (strlen($val) == 0)
{
return 0;
}
if (strlen($val) == 0) {
return 0;
}
$val = trim($val);
$last = $val{strlen($val)-1};
switch($last) {
$last = $val[strlen($val) - 1];
switch ($last) {
case 'k':
case 'K':
return (int) $val * 1024;
@ -157,38 +141,31 @@ function return_bytes($val) {
}
}
function isPHPExtensionLoaded ($extension)
{
$value = extension_loaded($extension);
if ($value === NULL)
{
return E_EXTENSION_CANTCHECK;
}
if ($value === true)
{
return E_EXTENSION_AVAILABLE;
}
if ($value === false)
{
return E_EXTENSION_UNAVAILABLE;
}
function isPHPExtensionLoaded($extension) {
$value = extension_loaded($extension);
if ($value === NULL) {
return E_EXTENSION_CANTCHECK;
}
if ($value === true) {
return E_EXTENSION_AVAILABLE;
}
if ($value === false) {
return E_EXTENSION_UNAVAILABLE;
}
}
function isRegisterLongArraysActive ()
{
if (version_compare(phpversion(), "5.0.0", ">=") == true)
{
if (getPHPIniSetting("register_long_arrays") == false)
{
return false;
}
}
return true;
function isRegisterLongArraysActive() {
if (version_compare(phpversion(), "5.0.0", ">=") == true) {
if (getPHPIniSetting("register_long_arrays") == false) {
return false;
}
}
return true;
}
/**
@ -201,7 +178,8 @@ function isPHPCompatible($sVersion = "5.2.0") {
if (version_compare(phpversion(), $sVersion, ">=") == true) {
return true;
} else {
return false;
return false;
}
}
?>

Datei anzeigen

@ -446,7 +446,7 @@ class cSetupSystemtest extends cSetupMask {
}
public function doFileSystemTests() {
if(!is_readable(CON_SETUP_PATH."/data")) {
if (!is_readable(CON_SETUP_PATH . "/data")) {
$this->runTest(false, C_SEVERITY_ERROR, i18n_setup("Setup data folder not readable!"), i18n_setup("Please check the Folder setup/data! Maybe it' s missing or not readable."));
}
// old logs
@ -461,7 +461,7 @@ class cSetupSystemtest extends cSetupMask {
$this->logFilePrediction("data/logs/errorlog.txt");
$this->logFilePrediction("data/logs/setuplog.txt");
}
// new folders in data-folder
$this->logFilePrediction("data/cache/");
$this->logFilePrediction("data/temp/");
@ -471,18 +471,18 @@ class cSetupSystemtest extends cSetupMask {
// cronjobs
$sFolder = 'data/cronlog/';
$this->logFilePrediction($sFolder."pseudo-cron.log");
$this->logFilePrediction($sFolder."session_cleanup.php.job");
$this->logFilePrediction($sFolder."send_reminder.php.job");
$this->logFilePrediction($sFolder."optimize_database.php.job");
$this->logFilePrediction($sFolder."move_old_stats.php.job");
$this->logFilePrediction($sFolder."move_articles.php.job");
$this->logFilePrediction($sFolder."linkchecker.php.job");
$this->logFilePrediction($sFolder."run_newsletter_job.php.job");
$this->logFilePrediction($sFolder."setfrontenduserstate.php.job");
$this->logFilePrediction($sFolder."advance_workflow.php.job");
$this->logFilePrediction($sFolder . "pseudo-cron.log");
$this->logFilePrediction($sFolder . "session_cleanup.php.job");
$this->logFilePrediction($sFolder . "send_reminder.php.job");
$this->logFilePrediction($sFolder . "optimize_database.php.job");
$this->logFilePrediction($sFolder . "move_old_stats.php.job");
$this->logFilePrediction($sFolder . "move_articles.php.job");
$this->logFilePrediction($sFolder . "linkchecker.php.job");
$this->logFilePrediction($sFolder . "run_newsletter_job.php.job");
$this->logFilePrediction($sFolder . "setfrontenduserstate.php.job");
$this->logFilePrediction($sFolder . "advance_workflow.php.job");
if ($_SESSION["setuptype"] == "setup" || ($_SESSION["setuptype"] == "migration" && is_dir("../cms/"))) {
$this->logFilePrediction("cms/cache/");
@ -527,19 +527,19 @@ class cSetupSystemtest extends cSetupMask {
case C_PREDICT_CHANGEPERM_SAMEOWNER:
$mfileperms = substr(sprintf("%o", fileperms("../" . $sFile)), -3);
$mfileperms{0} = intval($mfileperms{0}) | 0x6;
$mfileperms[0] = intval($mfileperms[0]) | 0x6;
$sPredictMessage = sprintf(i18n_setup("Your web server and the owner of your files are identical. You need to enable write access for the owner, e.g. using chmod u+rw %s, setting the file mask to %s or set the owner to allow writing the file."), $sFile, $mfileperms);
break;
case C_PREDICT_CHANGEPERM_SAMEGROUP:
$mfileperms = substr(sprintf("%o", fileperms("../" . $sFile)), -3);
$mfileperms{1} = intval($mfileperms{1}) | 0x6;
$mfileperms[1] = intval($mfileperms[1]) | 0x6;
$sPredictMessage = sprintf(i18n_setup("Your web server's group and the group of your files are identical. You need to enable write access for the group, e.g. using chmod g+rw %s, setting the file mask to %s or set the group to allow writing the file."), $sFile, $mfileperms);
break;
case C_PREDICT_CHANGEPERM_OTHERS:
$mfileperms = substr(sprintf("%o", fileperms("../" . $sFile)), -3);
$mfileperms{2} = intval($mfileperms{2}) | 0x6;
$mfileperms[2] = intval($mfileperms[2]) | 0x6;
$sPredictMessage = sprintf(i18n_setup("Your web server is not equal to the file owner, and is not in the webserver's group. It would be highly insecure to allow world write acess to the files. If you want to install anyways, enable write access for all others, e.g. using chmod o+rw %s, setting the file mask to %s or set the others to allow writing the file."), $sFile, $mfileperms);
break;
}
@ -558,19 +558,19 @@ class cSetupSystemtest extends cSetupMask {
case C_PREDICT_CHANGEPERM_SAMEOWNER:
$mfileperms = substr(sprintf("%o", @fileperms($sTarget)), -3);
$mfileperms{0} = intval($mfileperms{0}) | 0x6;
$mfileperms[0] = intval($mfileperms[0]) | 0x6;
$sPredictMessage = sprintf(i18n_setup("Your web server and the owner of your directory are identical. You need to enable write access for the owner, e.g. using chmod u+rw %s, setting the directory mask to %s or set the owner to allow writing the directory."), dirname($sFile), $mfileperms);
break;
case C_PREDICT_CHANGEPERM_SAMEGROUP:
$mfileperms = substr(sprintf("%o", @fileperms($sTarget)), -3);
$mfileperms{1} = intval($mfileperms{1}) | 0x6;
$mfileperms[1] = intval($mfileperms[1]) | 0x6;
$sPredictMessage = sprintf(i18n_setup("Your web server's group and the group of your directory are identical. You need to enable write access for the group, e.g. using chmod g+rw %s, setting the directory mask to %s or set the group to allow writing the directory."), dirname($sFile), $mfileperms);
break;
case C_PREDICT_CHANGEPERM_OTHERS:
$mfileperms = substr(sprintf("%o", @fileperms($sTarget)), -3);
$mfileperms{2} = intval($mfileperms{2}) | 0x6;
$mfileperms[2] = intval($mfileperms[2]) | 0x6;
$sPredictMessage = sprintf(i18n_setup("Your web server is not equal to the directory owner, and is not in the webserver's group. It would be highly insecure to allow world write acess to the directory. If you want to install anyways, enable write access for all others, e.g. using chmod o+rw %s, setting the directory mask to %s or set the others to allow writing the directory."), dirname($sFile), $mfileperms);
break;
}
@ -580,5 +580,3 @@ class cSetupSystemtest extends cSetupMask {
}
}
?>