Access Denied Lock Error
When you try to save a file such as a Microsoft Excel workbook that you opened by using a universal naming convention (UNC) path, you may receive an error message that is similar to one of the following:
Cannot read file. File is locked Access Denied Lock Error
Event Viewer may contain the following event:
Event Type: Information
Event Source: Application Popup
Event Category: None
Event ID: 26
User: N/A
Cause
This problem occurs when the redirector flushes the contents of the file, and writes to a file handle with read-only access instead of to a file handle with write access. When the redirector received an opportunistic lock break to none, it purged the cache for the file, but did not uninitialize the cache for the file. The redirector also needed to purge and uninitialize when the set end of file occurs because the opportunistic lock break is asynchronous. Because it did not uninitialize the cache for the file, it wrote to the incorrect file handle.
Resolution and Workaround
A supported fix is now available from Microsoft, but it is only intended to correct the problem described in this article. Only apply it to systems that are experiencing this specific problem. This fix may receive additional testing to further ensure product quality. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next Windows XP Service Pack 2 that contains this fix.
To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:
http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS
WORKAROUND
WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk. To work around this problem, disable opportunistic locking on the file server:
1. Click Start, and then click Run.
2. In the Open box, type regedit, and then press ENTER.
3. In Registry Editor, locate the following subkey in the registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
4. In the right pane, click EnableOplocks, and then press ENTER.
5. In the Value data box, type 0, and then press ENTER.
