What is .LCK file and why it appears on my server?
An unknown file appear on my server. The filename is test.php.LCK. I download and open in notepad, the contents are:
"my computer name" || "my email address"
I am very sure I did not put the file to the server and I am the only one who manage the server. Questions:
Q1: Is that a virus?
Q2: What can it harm to my server?
Q3: How to removed it from my server?(just shift+delete?) (I ran a full scan on the server using norton antivirus 2008, but nothing found)
Q4: How to protect my server from this file?
Solution 1:
This is a lock file from Dreamweaver. See this page for more information about it. It is simply Dreamweaver's way of knowing that you were working on the file at one point, and it should not let your (hypothetical) coworkers work on it.
Solution 2:
It's probably a lockfile, meaning it was put there by a program or script as a way of saying, "Hey, I'm running, so don't let another instance of the program/script run or we'll run over each other's toes!"
A quick google of "test.php.LCK" shows that there are a lot of other sites showing this file and information.
I very much doubt it's a virus. You don't give specs on what you're running, but the Norton hints that you're running IIS on Windows? You can try using procmon, process explorer, regmon and filemon from the sysinternals suite (free download) to see if any of them show what has an open file handle on that particular file.
In the end it's probably nothing to "protect" against. Lock files are a mechanism used by scripts and many UNIX applications to add a kind of flag preventing other instances from running. You should only delete them if the program crashes and leaves the lockfile behind, preventing another instance from running when you restart the process that crashed.