Commit fda48016 authored by tbrehm's avatar tbrehm
Browse files

Fixed: FS#732 - Fcgi 503 trouble if changing sites group

parent 3dbcc339
...@@ -270,6 +270,9 @@ class apache2_plugin { ...@@ -270,6 +270,9 @@ class apache2_plugin {
exec('mv '.$data["old"]["document_root"].' '.$new_dir); exec('mv '.$data["old"]["document_root"].' '.$new_dir);
$app->log("Moving site to new document root: ".'mv '.$data["old"]["document_root"].' '.$new_dir,LOGLEVEL_DEBUG); $app->log("Moving site to new document root: ".'mv '.$data["old"]["document_root"].' '.$new_dir,LOGLEVEL_DEBUG);
//* Change the owner of the website files to the new website owner
exec('chown --recursive --from='.escapeshellcmd($data["old"]["system_user"]).':'.escapeshellcmd($data['old']['system_group']).' '.escapeshellcmd($data["new"]["system_user"]).':'.escapeshellcmd($data['new']['system_group']).' '.$new_dir);
//* Change the home directory and group of the website user //* Change the home directory and group of the website user
$command = 'usermod'; $command = 'usermod';
$command .= ' --home '.escapeshellcmd($data["new"]["document_root"]); $command .= ' --home '.escapeshellcmd($data["new"]["document_root"]);
...@@ -277,6 +280,9 @@ class apache2_plugin { ...@@ -277,6 +280,9 @@ class apache2_plugin {
$command .= ' '.escapeshellcmd($data["new"]["system_user"]); $command .= ' '.escapeshellcmd($data["new"]["system_user"]);
exec($command); exec($command);
} }
//print_r($data); //print_r($data);
...@@ -577,12 +583,14 @@ class apache2_plugin { ...@@ -577,12 +583,14 @@ class apache2_plugin {
if (!is_dir($fastcgi_starter_path)) if (!is_dir($fastcgi_starter_path))
{ {
exec("mkdir -p ".escapeshellcmd($fastcgi_starter_path)); exec("mkdir -p ".escapeshellcmd($fastcgi_starter_path));
exec("chown ".$data["new"]["system_user"].":".$data["new"]["system_group"]." ".escapeshellcmd($fastcgi_starter_path)); //exec("chown ".$data["new"]["system_user"].":".$data["new"]["system_group"]." ".escapeshellcmd($fastcgi_starter_path));
$app->log("Creating fastcgi starter script directory: $fastcgi_starter_path",LOGLEVEL_DEBUG); $app->log("Creating fastcgi starter script directory: $fastcgi_starter_path",LOGLEVEL_DEBUG);
} }
exec("chown -R ".$data["new"]["system_user"].":".$data["new"]["system_group"]." ".escapeshellcmd($fastcgi_starter_path));
$fcgi_tpl = new tpl(); $fcgi_tpl = new tpl();
$fcgi_tpl->newTemplate("php-fcgi-starter.master"); $fcgi_tpl->newTemplate("php-fcgi-starter.master");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment