Files locked by the anti-virus server

  • Article ID: 13585
  • Updated: 17 Feb 2010

With Sophos Anti-Virus for NetApp Storage Systems, files can become locked by the anti-virus server, for example, when being copied or deleted. The following error message may be displayed:

The process cannot access the file because it is being used by another process.

The locking happens because the 'Sophos Anti-virus for NetApp' service opens the file to be scanned in a separate thread, and the on-access scanner then also picks up the file to scan it. If the scan has not finished within 60 seconds, the thread is terminated but the file handle is still owned by another process. The file then becomes locked.

What to do

There are several different things you can do to alleviate this issue:

  • Turn off 'Scan inside archive files'
    This will reduce the time spent scanning files. Files that are not archives will take very little time to scan and should therefore not trigger this problem. Archives can take a very long time to scan, so not scanning them will reduce the chances of encountering this problem.
  • Increase the thread timeout value
    You can do this by changing the value of the following registry key (please read the warning about editing the registry):
    HKLM\Software\Sophos\SAV for NetApp\Thread timeout
    Input the value in hex, giving the number of seconds you want for timeout.
  • Increase the timeout on the filer
    You can increase timeout on the NetApp filer by entering the following command:
    vscan options timeout set <timeout_val>
    Where <timeout_val> is the number that you want the timeout to be in seconds.

Technical details

The example below demonstrates the problem. If you type:

L:\>del /s /q l:\dsavtest\*.*

The following is displayed, and the file becomes locked:

The process cannot access the file because it is being used by another process.

If you need more information or guidance, then please contact technical support.

Rate this article

Very poor Excellent