| | |
| | | } |
| | | |
| | | |
| | | if($this->action == 'insert') { |
| | | // Chown and chmod the directories below the document root |
| | | exec("chown -R $username:$groupname ".escapeshellcmd($data["new"]["document_root"])); |
| | | |
| | | // Chown and chmod the directories |
| | | exec("chown -R $username:$groupname ".escapeshellcmd($data["new"]["document_root"])); |
| | | // The document root itself has to be owned by root |
| | | exec("chown root:root ".escapeshellcmd($data["new"]["document_root"])); |
| | | } |
| | | |
| | | // make temp direcory writable for the apache user and the website user |
| | | exec("chmod 777 ".escapeshellcmd($data["new"]["document_root"]."/tmp")); |
| | |
| | | $cgi_tpl = new tpl(); |
| | | $cgi_tpl->newTemplate("php-cgi-starter.master"); |
| | | |
| | | $cgi_tpl->setVar('open_basedir',$data["new"]["document_root"]); |
| | | $cgi_tpl->setVar('open_basedir', "/var/www/" . $data["new"]["domain"]); |
| | | $cgi_tpl->setVar('php_cgi_bin',$cgi_config["cgi_bin"]); |
| | | |
| | | $cgi_starter_script = escapeshellcmd($cgi_starter_path.$cgi_config["cgi_starter_script"]); |