From fa2806bddf4ce838d30d7fab1b5300e8632c586d Mon Sep 17 00:00:00 2001 From: tbrehm Date: Tue, 5 Jun 2012 14:31:34 +0000 Subject: [PATCH] Fixed: FS#2218 - Check if web root has wrong permissions for jailed cronjobs --- server/plugins-available/apache2_plugin.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index bac1dcf0c..9f03c5523 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -642,9 +642,10 @@ class apache2_plugin { * website root has to be owned by the root user and we have to chmod it to 755 then */ - //* Check if there is a jailkit user for this site + //* Check if there is a jailkit user or cronjob for this site $tmp = $app->db->queryOneRecord('SELECT count(shell_user_id) as number FROM shell_user WHERE parent_domain_id = '.$data['new']['domain_id']." AND chroot = 'jailkit'"); - if($tmp['number'] > 0) { + $tmp2 = $app->db->queryOneRecord('SELECT count(id) as number FROM cron WHERE parent_domain_id = '.$data['new']['domain_id']." AND `type` = 'chrooted'"); + if($tmp['number'] > 0 || $tmp2['number'] > 0) { $this->_exec('chmod 755 '.escapeshellcmd($data['new']['document_root'])); $this->_exec('chown root:root '.escapeshellcmd($data['new']['document_root'])); } -- GitLab