From 3d44d381bcd5fd8b092d100eb49207963deb53b1 Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Mon, 7 Apr 2014 09:55:04 +0200 Subject: [PATCH 1/2] correct permissions after creating cron.d-file Signed-off-by: Michael Kaufmann (d00p) --- lib/functions/froxlor/function.checkCrondConfigurationFile.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/functions/froxlor/function.checkCrondConfigurationFile.php b/lib/functions/froxlor/function.checkCrondConfigurationFile.php index 7490e03d..70b02a07 100644 --- a/lib/functions/froxlor/function.checkCrondConfigurationFile.php +++ b/lib/functions/froxlor/function.checkCrondConfigurationFile.php @@ -95,6 +95,8 @@ function checkCrondConfigurationFile() { // oh snap cannot create new crond-file die("Oh snap, we cannot create the cron.d file. This should not happen.\nPlease check the path and permissions, the cron will keep trying if you don't stop the cron-service.\n\n"); } + // correct permissions + chmod(Settings::Get("system.cronconfig"), 0640); // remove all re-generation tasks Database::query("DELETE FROM `" . TABLE_PANEL_TASKS . "` WHERE `type` = '99'"); From d73e5f8dc794d7e904b2787367a99e62e3bec026 Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Sat, 12 Apr 2014 09:37:51 +0200 Subject: [PATCH 2/2] fix prepending of domain-name to domain.documentroot if admin has 'edit-server-settings == false' when adding a new domain Signed-off-by: Michael Kaufmann (d00p) --- admin_domains.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/admin_domains.php b/admin_domains.php index 7ba75af0..7bbfe723 100644 --- a/admin_domains.php +++ b/admin_domains.php @@ -351,7 +351,14 @@ if ($page == 'domains' $admin = $userinfo; } - $documentroot = $customer['documentroot']; + // set default path if admin/reseller has "change_serversettings == false" but we still + // need to respect the documentroot_use_default_value - setting + $path_suffix = ''; + if (Settings::Get('system.documentroot_use_default_value') == 1) { + $path_suffix = '/'.$domain; + } + $documentroot = makeCorrectDir($customer['documentroot'] . $path_suffix); + $registration_date = trim($_POST['registration_date']); $registration_date = validate($registration_date, 'registration_date', '/^(19|20)\d\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|3[01])$/', '', array('0000-00-00', '0', ''));