Why Does MetaDefender Core Show a 'Calculate hash error' When Scanning Malicious Files?

This article is applied to all MetaDefender Core releases on Windows and Linux.

Issue

When testing the upload of a malicious file to MetaDefender Core, the system unexpectedly allows the file and displays the following error during scanning:

**Error Details**: Can't get file info to calculate hash: '**Can't open file for reading**'

Error Details: Can't get file info to calculate hash: 'Can't open file for reading'

Reason for the error

In most cases, this error happens when an Antivirus software on the machine is detecting and blocking the malware file before MetaDefender Core can access it. As a result, MetaDefender Core is unable to read the file and generate the necessary hash of the file.

Solution

To resolve this issue, you will need to add exclusions for MetaDefender Core directories in your local antivirus software.

Add Exclusions in Antivirus Software:

  • Exclude full installation path of MetaDefender Core:

    • On Windows: C:\Program Files\OPSWAT\MetaDefender Core\
    • On Linux: /var/lib/ometascan
  • Exclude the temporary upload path used by MetaDefender Core (default):

    • On Windows: <installation directory>\data\resources.
    • On Linux: /var/tmp/ometascan/resources.
  • Exclude specific processes:

    • On Windows: “engineprocess.exe”, “engineprocess32.exe”, “ometascan.exe”, “postgres.exe” and “nginx.exe” processes.
    • On Linux: “engineprocess”, “ometascan”, “postgres” and “nginx” processes.

If you have modified the temporary folder path (using tempdirectory parameter), you will need to exclude the path you have set for it.

Reference: MetaDefender Configuration - MetaDefender Core

If Further Assistance is required, please proceed to log a support case or chatting with our support engineer.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard