PDA

View Full Version : index.html keeps reappearing


gkovacs
18th January 2009, 07:23
I have a couple of sites running on ISPConfig 3.0.0.8. One problem that bothers me is that the 4 default files in the web/ folder (index.html, favicon.ico, .htaccess and robots.txt) keep reappearing even after being deleted several times.

What could cause this behaviour and how can I solve this?

till
18th January 2009, 12:05
Did you create a own index file in the website? If yes and the files still reappear, please post it to the bugtracker:

http://bugtracker.ispconfig.org

reed
20th January 2009, 01:14
I have the same problem. Running 2.2.29 in SUSE 10.2. I can upload and replace index.html file to the web directory in a newly created site but url resolves to the old index.html file

gkovacs
20th January 2009, 09:44
Did you create a own index file in the website? If yes and the files still reappear, please post it to the bugtracker:

http://bugtracker.ispconfig.org

I did not create an index.html, I have an index.php file, but every 1-2 days (I'm not sure what triggers it) all four original files reappear in the web/ folder.

It even empties my .htaccess file, but interestingly not with the original one.

till
20th January 2009, 11:02
A index.php file is fine. ISPConfig will not copy the files again if there is a file named index.php, index.htm, index.html etc. The standard index files can be set in the ispconfig interface. Maybe you removed index.php from the list of standard index pages.

gkovacs
28th January 2009, 08:13
A index.php file is fine. ISPConfig will not copy the files again if there is a file named index.php, index.htm, index.html etc.

Unfortunately, it does. I have an index.php and a .htaccess, and both get overwritten every 2 days.


The standard index files can be set in the ispconfig interface. Maybe you removed index.php from the list of standard index pages.

Although I don't remember removing index.php from anywhere, exactly where can I find this list of index pages?

till
28th January 2009, 12:22
Unfortunately, it does. I have an index.php and a .htaccess, and both get overwritten every 2 days.

Ok, then it is most likely not related to ISPConfig as ISPConfig does not put any .htaccess files in the web root of a server, it only adds a .htaccess file to the stats directory. Also there is no cronjob in ispconfig that runs every two days.

gkovacs
28th January 2009, 13:45
I'm POSITIVE it's ISPConfig, since the 4 default files in the web/ folder get copied back, with their original permissions (they show up in green in MC):

index.html
favicon.ico
robots.txt
.htaccess (0 byte length)

Also it's not strictly 2 days, it's rougly a couple of days. As I've said, I'm not sure what the trigger is, but it sure doesn't give a damn about my index.php file.

gkovacs
28th January 2009, 13:53
BTW we use the following .htaccess file:

DirectoryIndex index.php
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR]
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php

Is it possible that this fools ISPConfig somehow? Because it seems that after creating this .htaccess will the restoring happen.

falko
29th January 2009, 19:19
Can you go to the web site's document root and post the output of ls -la?

gkovacs
29th January 2009, 19:38
Below is the root of the affected site. If I leave it this way, nothing happens.

But if I create a .htaccess file with the above content, the copying will happen sometime in the near future (I suspect by cron or after regular ispconfig activity, but usually not the same day).

total 1804
drwxr-xr-x 36 web19 client3 4096 Jan 29 18:34 .
drwxr-xr-x 6 web19 client3 4096 Jan 23 06:44 ..
-rw-r--r-- 1 web19 client3 85969 Dec 2 2007 CHANGELOG.php
-rw-r--r-- 1 web19 client3 3429 Dec 2 2007 COPYRIGHT.php
-rw-r--r-- 1 web19 client3 4374 Dec 2 2007 INSTALL.php
-rw-r--r-- 1 web19 client3 17977 Dec 2 2007 LICENSE.php
...
code removed for security

falko
30th January 2009, 13:21
Permissions look ok. I have no idea what's causing this...
When the files get replaced, what's in index.html? Is it the ISPConfig welcome page?

gkovacs
30th January 2009, 15:10
Permissions look ok. I have no idea what's causing this...
When the files get replaced, what's in index.html? Is it the ISPConfig welcome page?

Yes, the 3 default files from the ISPConfig site and a 0 byte .htaccess file.

falko
31st January 2009, 14:12
I have no idea what's causing this. All I can say is that ISPConfig doesn't put a welcome page in the directory if there's an index file in it. You can check that in the function make_docroot() in /root/ispconfig/scripts/lib/config.lib.php.

gkovacs
2nd February 2009, 19:41
The copier striked again at 18:19 today on one of our servers, for no reason at all. Overwrote the root folders of a lot of our (operational) domains with the ISPConfig default structure (index.html, robots.txt, favicon.ico and a ZERO byte .htaccess file, plus two folders: error/ and stats/)

Here is the ISPConfig log of the operation:
http://testblueray.pannonhosting.hu/log.txt

(A note of our setup: the dbispconfig database is located on a separate MySQL server, if that affects the operation in any way. Maybe an SQL timeout causes this?)

gkovacs
4th February 2009, 18:06
We have nailed the ISPConfig problem down (overwriting of user files with the default web/ structure) to most likely be caused by some error in the database code.

Experience:
The last unwanted overwriting happened when our MySQL server was down or at least very unresponsive for a couple of minutes.

Conjecture:
ISPConfig tries to check a particular site in it's database (maybe from cron?), if it encounters a timeout with MySQL then it initializes the entire site again, copying back the default files and folders, not checking for user index files.


We are trying to reproduce the problem, but it's not easy to intentionally slow down MySQL without not returning an error.
Any helpful ideas / insights?

falko
5th February 2009, 21:39
I've added this to our bugtracker.

askibinski
24th September 2009, 11:37
I can confirm this bug (ispconfig 3.0.1). Seems to happen during a cron run.

This is a critical bug as it can take down a live site. Any updates on this? (what's the link to this bug in the bugtracker?)

In the meanwhile, I'm looking for a workaround by removing the default files (which I don't need anyway) all together. I think the config for that would be somewhere in /usr/local/ispconfig/conf ?

till
24th September 2009, 11:51
This has been fixed a long time ago, ISPConfig 3.0.1 is a outdated version, please update to the current release (3.0.1.4)