tbrehm
2011-11-15 88273a930b0d36fb17ba64b5db6ff1052df5da89
server/plugins-available/apache2_plugin.inc.php
@@ -541,18 +541,19 @@
      if($this->action == 'insert' || $data["new"]["system_user"] != $data["old"]["system_user"]) {
         // Chown and chmod the directories below the document root
         $this->_exec('chown -R '.$username.':'.$groupname.' '.escapeshellcmd($data['new']['document_root']));
         $this->_exec('chown -R '.$username.':'.$groupname.' '.escapeshellcmd($data['new']['document_root']).'/web');
         // The document root itself has to be owned by root in normal level and by the web owner in security level 20
         if($web_config['security_level'] == 20) {
            $this->_exec('chown '.$username.':'.$groupname.' '.escapeshellcmd($data['new']['document_root']));
            $this->_exec('chown '.$username.':'.$groupname.' '.escapeshellcmd($data['new']['document_root']).'/web');
         } else {
            $this->_exec('chown root:root '.escapeshellcmd($data['new']['document_root']));
            $this->_exec('chown root:root '.escapeshellcmd($data['new']['document_root']).'/web');
         }
      }
      //* If the security level is set to high
      if($this->action == 'insert' && $data['new']['type'] == 'vhost') {
      if($web_config['security_level'] == 20) {
         $this->_exec('chmod 751 '.escapeshellcmd($data['new']['document_root']));
@@ -610,6 +611,7 @@
         // make temp directory writable for Apache and the website users
         $this->_exec('chmod 777 '.escapeshellcmd($data['new']['document_root'].'/tmp'));
      }
      }
      // Change the ownership of the error log to the owner of the website
      if(!@is_file($data['new']['document_root'].'/log/error.log')) exec('touch '.escapeshellcmd($data['new']['document_root']).'/log/error.log');