From dd8d31dff34a6d29144d4d08e8f24f593d002d5e Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Sat, 30 Jan 2010 13:41:12 +0000 Subject: [PATCH] - create folder for htpasswd/htaccess entries if it does not exist (as we say on the interface) --- scripts/jobs/cron_tasks.inc.http.20.lighttpd.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/jobs/cron_tasks.inc.http.20.lighttpd.php b/scripts/jobs/cron_tasks.inc.http.20.lighttpd.php index 1079219a..fea14f02 100644 --- a/scripts/jobs/cron_tasks.inc.http.20.lighttpd.php +++ b/scripts/jobs/cron_tasks.inc.http.20.lighttpd.php @@ -121,6 +121,9 @@ class lighttpd while($row_htpasswds = $this->db->fetch_array($result_htpasswds)) { + $row_htpasswds['path'] = makeCorrectDir($row_htpasswds['path']); + mkDirWithCorrectOwnership($domain['documentroot'], $row_htpasswds['path'], $domain['guid'], $domain['guid']); + $filename = $row_htpasswds['customerid'] . '-' . md5($row_htpasswds['path']) . '.htpasswd'; if(!in_array($row_htpasswds['path'], $needed_htpasswds)) @@ -324,6 +327,8 @@ class lighttpd if($row['options_indexes'] != '0') { $path = makeCorrectDir(substr($row['path'], strlen($domain['documentroot']) - 1)); + + mkDirWithCorrectOwnership($domain['documentroot'], $row['path'], $domain['guid'], $domain['guid']); // We need to remove the last slash, otherwise the regex wouldn't work