Merge pull request #1345 from Pr0mises/master

added $dirChmod and $fileChmod variable to LinuxStartApp()
This commit is contained in:
Jan 2023-01-25 18:27:33 +01:00 committed by GitHub
commit 66bf78c312
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1694,24 +1694,29 @@ class AppServer {
$script .= '${IONICE}find -L ' . $serverDir . ' -type l -delete' . "\n"; $script .= '${IONICE}find -L ' . $serverDir . ' -type l -delete' . "\n";
$dirChmod = 700
$fileChmod = 600;
if ($this->appServerDetails['protectionModeStarted'] == 'Y') { if ($this->appServerDetails['protectionModeStarted'] == 'Y') {
$script .= '${IONICE}nice -n +19 find ' . $serverDir . ' -type d -print0 | xargs -0 chmod 750' . "\n"; $dirChmod = 750;
$fileChmod = 640;
$script .= '${IONICE}nice -n +19 find ' . $serverDir . ' -type d -print0 | xargs -0 chmod ' . $dirChmod . "\n";
if ($this->appServerDetails['template']['copyStartBinary'] == 'Y' and strlen($this->appServerDetails['template']['gameBinary']) > 0) { if ($this->appServerDetails['template']['copyStartBinary'] == 'Y' and strlen($this->appServerDetails['template']['gameBinary']) > 0) {
$script .= '${IONICE}nice -n +19 find ' . $serverDir . ' -type f ! -name "' . $this->appServerDetails['template']['gameBinary'] . '" -print0 | xargs -0 chmod 750' . "\n"; $script .= '${IONICE}nice -n +19 find ' . $serverDir . ' -type f ! -name "' . $this->appServerDetails['template']['gameBinary'] . '" -print0 | xargs -0 chmod ' . $dirChmod . "\n";
} else { } else {
$script .= '${IONICE}nice -n +19 find ' . $serverDir . ' -type f ! -name "ShooterGameServer" -print0 | xargs -0 chmod 640' . "\n"; $script .= '${IONICE}nice -n +19 find ' . $serverDir . ' -type f ! -name "ShooterGameServer" -print0 | xargs -0 chmod ' . $fileChmod . "\n";
} }
} else { } else {
$script .= '${IONICE}nice -n +19 find ' . $serverDir . ' -type d -print0 | xargs -0 chmod 700' . "\n"; $script .= '${IONICE}nice -n +19 find ' . $serverDir . ' -type d -print0 | xargs -0 chmod ' . $dirChmod . "\n";
if ($this->appServerDetails['template']['copyStartBinary'] == 'Y' and strlen($this->appServerDetails['template']['gameBinary']) > 0) { if ($this->appServerDetails['template']['copyStartBinary'] == 'Y' and strlen($this->appServerDetails['template']['gameBinary']) > 0) {
$script .= '${IONICE}nice -n +19 find ' . $serverDir . ' -type f ! -name "' . $this->appServerDetails['template']['gameBinary'] . '" -print0 | xargs -0 chmod 700' . "\n"; $script .= '${IONICE}nice -n +19 find ' . $serverDir . ' -type f ! -name "' . $this->appServerDetails['template']['gameBinary'] . '" -print0 | xargs -0 chmod ' . $dirChmod . "\n";
} else { } else {
$script .= '${IONICE}nice -n +19 find ' . $serverDir . ' -type f ! -name "ShooterGameServer" -print0 | xargs -0 chmod 600' . "\n"; $script .= '${IONICE}nice -n +19 find ' . $serverDir . ' -type f ! -name "ShooterGameServer" -print0 | xargs -0 chmod ' . $fileChmod . "\n";
} }
// Remove files where they do not belong // Remove files where they do not belong