FAQ: Permission Denied Errors

On Windows, I sometimes get "permission denied" errors, or "volume externally altered" errors, or "file does not exist" error when building a database. But sometimes, it works. What can cause this sort of sporadic file error?

Short Answer

An anti-virus or anti-malware software, which is actively scanning your Sawmill installation folder, can cause this. Disable scanning of Sawmill's data folders, in the anti-virus product.

Long Answer

Some anti-virus software, and anti-malware software, actively scans the entire disk, looking for viruses or other malware. This sort of scanning can interfere with Sawmill's operation, if the software scans Sawmill's data files, or database. The anti-malware software interferes in two ways: (1) it opens Sawmill's data files, and holds them open while Sawmill is trying to write to them, during database builds, which causes Windows to refuse Sawmill write access to its own internal database files, and (2) if the malware detects a virus signature in one of Sawmill's database files, it may delete or modify that file, corrupting the database. The second scenario can occur even if there is no actual virus present, because Sawmill's database files are binary files, which can potentially contain any possible virus signature due to random permutations of the data; and worse, because Sawmill is often used to scan web logs, mail logs, and even antivirus logs which naturally contain virus signatures of the viruses which were encountered by the logging devices or servers.

Even when anti-virus scanning does not cause errors in Sawmill, it can greatly reduce the performance of Sawmill, as both fight for access to the same files. The performance impact can be 20 times or greater--a database which might normally takes 1 hour to build might take 20 hours or more.

The solution is to disable scanning of Sawmill's directories. Anti-malware should not be completely turned off--it is important to the security of your system, but most products can be selectively disabled, so they will not scan particular folders. In a default installation, Sawmill is found in the Program Files folder of the C: drive, so disabling scanning of the Sawmill folder there will greatly improve the performance and reliability of Sawmill.