These days antivirus and anti-malware software are a necessity that protects us from software viruses and malware that threaten our data. This security though has a downside in the form of false positives.
A false positive occurs when a benign file is suspected by your antivirus software of being malicious. Certain files update frequently, like database files. When these files are scanned every time they are written to disk, the files can appear locked to the software using them. When a necessary file is locked the software issues an error and can’t finish what is was trying to do.
At CyberMatrix we have had a major headache with several antivirus products locking the database files used in our applications. When this happens an error something like the following would be seen:
ElevateDB Error #600 File manager error (Cannot delete the file C:\DOCUME~1\user42\LOCALS~1\Temp\CM1S29083572PC45.EDBTbl (OS Error: The process cannot access the file because it is being used by another process. )).
When encountering such a problem the easiest thing to do is to configure your antivirus software to avoid scanning the problem file or file type or even the entire folder involved. In this case, the folder involved is users42’s Windows temp folder. Every antivirus software has a way to prevent certain files or folders from being scanned. In Microsoft Security Essentials for example, you just navigate to the Setting tab and click on Excluded files and locations. Enter the files and folders to exclude in the File Locations box and press the Add button.
If you want to avoid scanning an entire file type you can enter something like this:
The * is a wildcard which stand for any number of characters.
If doing that doesn’t solve the problem some other process is locking the file. The next usual suspect is our software itself. If a machine on your network has some sort of problem, our software might lock up while in the middle of writing to the database. This will lock some database files. Try closing down all instances of the software to see if it resolves the problem.
If that doesn’t work what you will have to do is use special software to see which application on whose machine is locking the files. One such program is Microsoft’s Process Explorer. In Process Explorer go to Find > Find Handle or DLL. In the “Handle or DLL substring:” text box, type the path to the file (e.g. “C:\Users\user42\AppData\Local\Temp\Clients.EDBTbl”) and click “Search”. All processes which have an open handle to that file should be listed. Go to each machine listed and close down those applications.
Antivirus software is indispensable in this day and age but it can cause headaches too. Please don’t blame innocent software vendors when a problem is caused by overzealous anti-malware scanning.