![]() |
Runaway script creating folders in web root
Hi,
I've been using ISPConfig2 for about 2.5 years now and it has suited my needs very well. It has been serving mail and web for several domains I operate without a problem for that time. A few weeks ago I made a number of changes to my network and today I noticed that there are a large number of new folders inside my web root which take the form of a line within the ISPConfig log. From what I can tell with my rudimentary PHP skills, the "/root/ispconfig/scripts/shell/logs.php" script is parsing the log lines incorrectly and creating new folders as a result. Here is an example of my /var/www/ directory ( i have replaced the domain names with #site1#, #site2# etc): Code:
drwxr-xr-x 3 root root 4.0K 2011-02-09 00:30 - #SITE2# - [08Around that time, the changes I made to my system were: 1) upgraded (apt dist-upgrade within same ubuntu 8.04 version) so many 'held back' packages were updated; and 2) installed a squid reverse proxy on another machine which determines which requests go to which machines as there are other servers within my network hosting other domains outside the scope of my ISPConfig install. I did a search of the forums here and didn't see any references to upgrades causing this problem, so I have assumed that my squid server is sending requests over which seem to be causing problems for the ISPConfig log parser. The odd thing is that the ISPConfig HTTPD logs seem to be working as normal, where the standard loglines appear as: Code:
203.82.208.13 #SITE2# - [20/Feb/2011:17:37:29 +0800] "GET /DC/ HTTP/1.0" 200 55569 "-""Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729; .NET4.0E)"It appears to me that the problem is coming from the following function in the "/root/ispconfig/scripts/shell/logs.php" file: Code:
function get_filename($virtual_host) {Code:
LogFormat "%{X-Forwarded-For}i %v %u %t \"%r\" %>s %b \"%{Referer}i\"\"%{User-Agent}i\"" cachedThanks Skinner |
Quote:
Code:
LogFormat "%v||||%b||||%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig |
Ah yes, that should have been obvious looking at the ISPConfig log format. I have changed it back and just added another log to get the info i want.
Thanks. |
Just confirming for any future readers that this fixed my problem and as as of the latest cron execution of "/root/ispconfig/scripts/shell/logs.php" no new directories were created.
Thanks again Sk |
| All times are GMT +2. The time now is 06:50. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.