Commit a7c4cb62 authored by Till Brehm's avatar Till Brehm
Browse files

Fixed #4886 Set strict permissions for CGI and fcgi starter files

parent 51036579
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1417,6 +1417,7 @@ class apache2_plugin {
			//exec('chown -R '.$data['new']['system_user'].':'.$data['new']['system_group'].' '.escapeshellcmd($fastcgi_starter_path));
			$app->system->chown($fastcgi_starter_path, $data['new']['system_user']);
			$app->system->chgrp($fastcgi_starter_path, $data['new']['system_group']);
			$app->system->chmod($fastcgi_starter_path, 0550);

			$fcgi_tpl = new tpl();
			$fcgi_tpl->newTemplate('php-fcgi-starter.master');
@@ -1459,7 +1460,7 @@ class apache2_plugin {

			$app->log('Creating fastcgi starter script: '.$fcgi_starter_script, LOGLEVEL_DEBUG);

			$app->system->chmod($fcgi_starter_script, 0755);
			$app->system->chmod($fcgi_starter_script, 0550);
			$app->system->chown($fcgi_starter_script, $data['new']['system_user']);
			$app->system->chgrp($fcgi_starter_script, $data['new']['system_group']);

@@ -1552,7 +1553,7 @@ class apache2_plugin {
				$app->system->mkdirpath($cgi_starter_path);
				$app->system->chown($cgi_starter_path, $data['new']['system_user']);
				$app->system->chgrp($cgi_starter_path, $data['new']['system_group']);
				$app->system->chmod($cgi_starter_path, 0755);
				$app->system->chmod($cgi_starter_path, 0550);

				$app->log('Creating cgi starter script directory: '.$cgi_starter_path, LOGLEVEL_DEBUG);
			}
@@ -1585,7 +1586,7 @@ class apache2_plugin {
			$app->log('Creating cgi starter script: '.$cgi_starter_script, LOGLEVEL_DEBUG);


			$app->system->chmod($cgi_starter_script, 0755);
			$app->system->chmod($cgi_starter_script, 0550);
			$app->system->chown($cgi_starter_script, $data['new']['system_user']);
			$app->system->chgrp($cgi_starter_script, $data['new']['system_group']);