Forum Moderators: phranque

Message Too Old, No Replies

Telnet 'top' and a command.

file.cgi is killing the server, yet the file now doesn't exist.

         

Jesse_Smith

4:53 am on Oct 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



On telnet I enter 'top' and there's one command named file.cgi that's using 50-75% of the CPU. I delete every file on the server with that name, kill the command and it just comes back.

find / -name file.cgi -print

now brings up nothing.

Is there anyway to kill this for good?

Jesse_Smith

5:30 am on Oct 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, that was weird. Delete file, still tries to kill the server. Upload the file and set the permission to 000, and it stops trying to kill the server.

seindal

12:34 pm on Oct 25, 2003 (gmt 0)

10+ Year Member



On Unix a file is only really deleted when there are no more references to it. A name in a directory can be such a reference, but it can also be because some process has the file open. If that is the case, the file is no longer found in the file system, but it still exists, because somebody is using it.

If your server uses mod-perl, then the file can be cached in memory of the web server, and it could continue to be executed even if the disk file disappears, though I would consider that a but in Apache::Registry or whatever your apache is set up to use.

Another possibility is that perl has read the file when it started up, and no longer uses the file, but the perl interpreter has the entire contents in memory for executing. This process can continue to execute the perl program, even if the original file no longer exists. You have to kill the process yourself.