create SuexecUserGroup-statement on apache/fpm if customer has perl enabled so perl-scripts run under the same username, fixes #1317

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2013-12-08 10:18:18 +01:00
parent 6a6c5db88d
commit dde6581f9c

View File

@@ -34,6 +34,11 @@ class apache_fcgid extends apache
if ($domain['ssl'] == 1 && $ssl_vhost) { if ($domain['ssl'] == 1 && $ssl_vhost) {
$srvName = 'ssl-fpm.external'; $srvName = 'ssl-fpm.external';
} }
// #1317 - perl is executed via apache and therefore, when using fpm, does not know the user
// which perl is supposed to run as, hence the need for Suexec need
if (customerHasPerlEnabled($domain['customerid'])) {
$php_options_text.= ' SuexecUserGroup "' . $domain['loginname'] . '" "' . $domain['loginname'] . '"' . "\n";
}
$php_options_text.= ' FastCgiExternalServer ' . $php->getInterface()->getAliasConfigDir() . $srvName . ' -socket ' . $php->getInterface()->getSocketFile() . ' -idle-timeout ' . $this->settings['phpfpm']['idle_timeout'] . "\n"; $php_options_text.= ' FastCgiExternalServer ' . $php->getInterface()->getAliasConfigDir() . $srvName . ' -socket ' . $php->getInterface()->getSocketFile() . ' -idle-timeout ' . $this->settings['phpfpm']['idle_timeout'] . "\n";
$php_options_text.= ' <Directory "' . makeCorrectDir($domain['documentroot']) . '">' . "\n"; $php_options_text.= ' <Directory "' . makeCorrectDir($domain['documentroot']) . '">' . "\n";
$php_options_text.= ' <FilesMatch "\.php$">' . "\n"; $php_options_text.= ' <FilesMatch "\.php$">' . "\n";