October 6Oct 6 Seit derm Update auf 2.3.15 bekomme ich nachts eine E-Mail des Cronjobs mit Zeilen wie diese:ln: /home/kunden/web1/awstats/domain1.de/2026-10/: das Überschreiben des Verzeichnisses ist nicht möglicJetzt habe ich das auf der Console mit --debug ausgeführt:# /usr/bin/php8.3 -q /var/www/froxlor/bin/froxlor-cli froxlor:cron 'traffic' --debug Checking froxlor file permissions...OK Running "traffic" job (debug) [information] Traffic run started... [information] http traffic for web1 started... [information] Running awstats_buildstaticpages.pl for domain 'domain1.de' (Output: '/home/kunden/web1/awstats/domain1.de/2026-10/') ln: /home/kunden/web1/awstats/domain1.de/2026-10/: das Überschreiben des Verzeichnisses ist nicht möglich [information] Gathering traffic information from '/home/kunden/web1/awstats/domain1.de/awstats102026.domain1.de.txt' [information] Running awstats_buildstaticpages.pl for domain 'domain2.de' (Output: '/home/kunden/web1/awstats/domain2.de/2026-10/') ln: /home/kunden/web1/awstats/domain2.de/2026-10/: das Überschreiben des Verzeichnisses ist nicht möglich [information] Gathering traffic information from '/home/kunden/web1/awstats/domain2.de/awstats102026.domain2.de.txt' [information] ftp traffic for web1 started... [information] mail traffic usage for web1 started... [information] total traffic for web1 started [information] calculating webspace usage for web1 [information] calculating mailspace usage for web1 [information] calculating mysqlspace usage for web1 [information] http traffic for web2 started... [information] Running awstats_buildstaticpages.pl for domain 'domain3.de' (Output: '/home/kunden/web2/awstats/domain3.de/2026-10/') ln: /home/kunden/web2/awstats/domain3.de/2026-10/: das Überschreiben des Verzeichnisses ist nicht möglich [information] Gathering traffic information from '/home/kunden/web2/awstats/domain3.de/awstats102026.domain3.de.txt' [information] ftp traffic for web2 started... [information] mail traffic usage for web2 started... [information] total traffic for web2 started [information] calculating webspace usage for web2 [information] calculating mailspace usage for web2 [information] calculating mysqlspace usage for web2Die Dateien werden aber angelegt / aktualisiert:-rw-r--r-- 1 web2 web2 11172 6. Okt 16:12 awstats.domain3.de.alldomains.html -rw-r--r-- 1 web2 web2 30572 6. Okt 16:12 awstats.domain3.de.allhosts.html -rw-r--r-- 1 web2 web2 7870 6. Okt 16:12 awstats.domain3.de.allrobots.html -rw-r--r-- 1 web2 web2 28704 6. Okt 16:12 awstats.domain3.de.browserdetail.html -rw-r--r-- 1 web2 web2 5469 6. Okt 16:12 awstats.domain3.de.downloads.htmlHat sich im Bereich des Cronjobs bzw der Erstellung der Statistiken etwas verändert oder wie bekomme ich die Fehlermeldung wieder los?
October 6Oct 6 vermutlich eher bzgl diverser "security" fixes was symlinks etc. angeht, muss ich mal debuggen, danke für die info
October 6Oct 6 Solution Probiere mal folgendes Patch, der sollte das Problem beheben:diff --git a/lib/Froxlor/FileDir.php b/lib/Froxlor/FileDir.php index 9bd3327e..e1520708 100644 --- a/lib/Froxlor/FileDir.php +++ b/lib/Froxlor/FileDir.php @@ -482,12 +482,19 @@ class FileDir if (substr($filename_to_check, 0, strlen($fixed_homedir)) != $fixed_homedir) { throw new Exception("Target path/file not within the required customer home directory"); } - // check whether file is symlink itself + // check whether file is symlink itself - only validate where it points to, but keep + // returning the path of the link (callers like 'ln -fTs' or unlink() need the link + // itself, not its target) if (is_link($filename)) { - $filename = readlink($filename); - $check_dir = FileDir::makeCorrectDir(dirname($filename), $fixed_homedir); + $link_target = readlink($filename); + if (substr($link_target, 0, 1) != '/') { + // relative target, resolve against the directory containing the link + $link_target = dirname($filename) . '/' . $link_target; + } + $link_target = self::resolveDotSegments($link_target); + $check_dir = FileDir::makeCorrectDir(dirname($link_target), $fixed_homedir); if (substr($check_dir, 0, strlen($fixed_homedir)) != $fixed_homedir) { - throw new Exception("Found symlink pointing outside of customer home directory: " . substr($filename, strlen($fixed_homedir))); + throw new Exception("Found symlink pointing outside of customer home directory: " . substr($link_target, strlen($fixed_homedir))); } } }
October 6Oct 6 Author Danke für die schnelle Hilfe. Habs eingebaut und geb dir dann Rückmeldung ob der Cronjob wieder eine Mail rausschickt.Auf der Console läuft es mit Debug sauber durch. Edited October 6Oct 6 by Shortie Console ergänzt
October 7Oct 7 Author Es lief auch heute Nacht wieder ohne Fehlermeldung durch. Nochmals Danke für die schnelle Lösung
Create an account or sign in to comment