tbrehm
2009-07-05 c6f5f009a2197c09a541e769376f85e2a89e3bec

1 files modified
17 ■■■■ changed files
server/plugins-available/apache2_plugin.inc.php 17 ●●●● patch | view | raw | blame | history
server/plugins-available/apache2_plugin.inc.php
@@ -476,27 +476,14 @@
            exec("chmod 711 ".escapeshellcmd($data["new"]["document_root"]."/*"));
            exec("chmod 710 ".escapeshellcmd($data["new"]["document_root"]."/web"));
            
            //* Change the home directory and group of the website user
            $command = 'usermod';
            $command .= ' --groups sshusers,'.escapeshellcmd($web_config['group']);
            $command .= ' '.escapeshellcmd($data["new"]["system_user"]);
            exec($command);
            $app->log("Modifying user: $command",LOGLEVEL_DEBUG);
            //* add the apache user to the client group
            $app->system->add_user_to_group($groupname, escapeshellcmd($web_config['user']));
        
            // make temp direcory writable for the apache user and the website user
            // exec("chmod 777 ".escapeshellcmd($data["new"]["document_root"]."/tmp"));
        // If the security Level is set to medium
        } else {
        
            exec("chmod 755 ".escapeshellcmd($data["new"]["document_root"]."/"));
            exec("chmod 755 ".escapeshellcmd($data["new"]["document_root"]."/*"));
            //* Change the home directory and group of the website user
            $command = 'usermod';
            $command .= ' --groups sshusers ';
            $command .= ' '.escapeshellcmd($data["new"]["system_user"]);
            exec($command);
            $app->log("Modifying user: $command",LOGLEVEL_DEBUG);
        
            // make temp direcory writable for the apache user and the website user
            exec("chmod 777 ".escapeshellcmd($data["new"]["document_root"]."/tmp"));