diff --git a/admin_domains.php b/admin_domains.php index 7bafaea6..c402c73a 100644 --- a/admin_domains.php +++ b/admin_domains.php @@ -1129,9 +1129,9 @@ if($page == 'domains' { $domains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id'], $result['aliasdomain']); } - + $subtodomains = makeoption($lng['domains']['nosubtomaindomain'], 0, NULL, true); - $result_domains = $db->query("SELECT `d`.`id`, `d`.`domain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c` WHERE `d`.`aliasdomain` IS NULL AND `d`.`parentdomainid`=0 AND `d`.`id`<>'" . (int)$result['id'] . "' AND `c`.`standardsubdomain`<>`d`.`id` AND `d`.`customerid`='" . (int)$result['customerid'] . "' AND `c`.`customerid`=`d`.`customerid` ORDER BY `d`.`domain` ASC"); + $result_domains = $db->query("SELECT `d`.`id`, `d`.`domain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c` WHERE `d`.`aliasdomain` IS NULL AND `d`.`parentdomainid`=0 AND `d`.`id`<>'" . (int)$result['id'] . "' AND `c`.`standardsubdomain`<>`d`.`id` AND `c`.`customerid`=`d`.`customerid` ORDER BY `d`.`domain` ASC"); while($row_domain = $db->fetch_array($result_domains)) { diff --git a/lib/cron_init.php b/lib/cron_init.php index fc4908d6..46c69892 100644 --- a/lib/cron_init.php +++ b/lib/cron_init.php @@ -167,6 +167,21 @@ unset($row); unset($result); fwrite($debugHandler, 'Froxlor settings have been loaded from the database' . "\n"); +/** + * if settings['system']['mod_fcgid_ownvhost'] is set, we have to check + * whether the permission of the files are still correct + */ +if((int)$settings['system']['mod_fcgid_ownvhost'] == 1) +{ + fwrite($debugHandler, 'Checking froxlor file permissions'); + $mypath = makeCorrectDir(dirname(dirname(__FILE__))); // /var/www/froxlor, needed for chown + $user = $settings['system']['mod_fcgid_httpuser']; + $group = $settings['system']['mod_fcgid_httpgroup']; + // all the files and folders have to belong to the local user + // now because we also use fcgid for our own vhost + safe_exec('chown -R ' . $user . ':' . $group . ' ' . escapeshellarg($mypath)); +} + if(!isset($settings['panel']['version']) || $settings['panel']['version'] != $version) {