"ERROR_SHARING_VIOLATION" error message in Windows XP or in Windows Server 2003 when you try to open a file on an SMB share on a server that is running Windows 7 or Windows Server 2008 R2

Applies To
Windows 7 Enterprise Windows 7 Professional Windows 7 Ultimate Windows Server 2008 R2 Datacenter Windows Server 2008 R2 Enterprise Windows Server 2008 R2 for Itanium-Based Systems Windows Server 2008 R2 Foundation Windows Server 2008 R2 Standard Windows Server 2008 R2 Web Edition

Symptoms

Consider the following scenario:

  • A file is hosted on a server that is running Windows 7 or Windows Server 2008 R2.

  • You use an application on a client computer that is running one of the following operating systems to open the file on the server:

    • Windows Vista
    • Windows Server 2008
    • Windows 7
    • Windows Server 2008 R2
  • The application opens the file by requesting read/write permission and DENY_WRITE share mode.
  • You close the file.
  • You try to use the same application on a client computer that is running Windows XP or Windows Server 2003 to open the same file.

In this scenario, you receive the following error message:

Note

ERROR_SHARING_VIOLATION (32).
The process cannot access the file because it is being used by another process.

Notes

  • You receive this error message twenty to thirty seconds after you close the file on the first client computer.

  • This issue does not occur if all client computers in the network environment are running Windows XP or Windows Server 2003.

  • This issue does not occur if all client computers in the network environment are running one of the following operating systems:

    • Windows Vista
    • Windows Server 2008
    • Windows 7
    • Windows Server 2008 R2

Cause

This issue occurs because an SMB2 client does not send an SMB2 CLOSE request to the server within twenty to thirty seconds when an application on the SMB2 client closes a file. If the same application on an SMB1 client opens the same file during this period, the server cannot start the OpLock break behavior and returns an "NT STATUS_SHARING_VIOLATION" error to the SMB1 client. This behavior prevents the SMB1 client from opening the file until the SMB2 client sends an SMB2 CLOSE request.

Notes

  • The following operating systems use the SMB1 protocol:

    • Windows XP
    • Windows Server 2003
  • The following operating systems use the SMB2 protocol:

    • Windows Vista
    • Windows Server 2008
    • Windows 7
    • Windows Server 2008 R2

Resolution

To resolve this issue, install the hotfix on the server that is running Windows 7 or Windows Server 2008 R2.

Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing the problem described in this article. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:

http:⁠//support.microsoft.com/contactus/?ws=support Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.

Prerequisites

To apply this hotfix, you must be running one of the following operating systems:

  • Windows 7
  • Windows 7 Service Pack 1 (SP1)
  • Windows Server 2008 R2
  • Windows Server 2008 R2 Service Pack 1 (SP1)

For more information about how to obtain a Windows 7 or Windows Server 2008 R2 service pack, click the following article number to view the article in the Microsoft Knowledge Base:

976932 Information about Service Pack 1 for Windows 7 and for Windows Server 2008 R2

Registry information

To apply the hotfix in this package, you do not have to make any changes to the registry.

Restart requirement

You must restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace a previously released hotfix.

File information

The global version of this hotfix installs files that have the attributes that are listed in the following tables. The dates and the times for these files are listed in Coordinated Universal Time (UTC). The dates and the times for these files on your local computer are displayed in your local time together with your current daylight saving time (DST) bias. Additionally, the dates and the times may change when you perform certain operations on the files.

Windows 7 and Windows Server 2008 R2 file information notes

                  

  • The files that apply to a specific product, milestone (RTM, SPn), and service branch (LDR, GDR) can be identified by examining the file version numbers as shown in the following table:

    Version Product Milestone Service branch
    6.1.760
    0.21xxx
    Windows 7 and Windows Server 2008 R2 RTM LDR
    6.1.760
    1.21xxx
    Windows 7 and Windows Server 2008 R2 SP1 LDR
  • The MANIFEST files (.manifest) and the MUM files (.mum) that are installed for each environment are listed separately in the "Additional file information for Windows Server 2008 R2 and for Windows 7" section. MUM and MANIFEST files, and the associated security catalog (.cat) files, are extremely important to maintain the state of the updated components. The security catalog files, for which the attributes are not listed, are signed with a Microsoft digital signature.

For all supported x86-based versions of Windows 7

File name File version File size Date Time Platform
Srv.sys 6.1.7600.21095 311,808 22-Nov-2011 03:33 x86
Srv.sys 6.1.7601.21864 311,808 22-Nov-2011 03:23 x86

For all supported x64-based versions of Windows 7 and of Windows Server 2008 R2

File name File version File size Date Time Platform
Srv.sys 6.1.7600.21095 460,800 22-Nov-2011 04:06 x64
Srv.sys 6.1.7601.21864 467,456 22-Nov-2011 03:43 x64

For all supported IA-64-based versions of Windows Server 2008 R2

File name File version File size Date Time Platform
Srv.sys 6.1.7600.21095 1,028,096 22-Nov-2011 03:18 IA-64
Srv.sys 6.1.7601.21864 1,028,608 22-Nov-2011 03:01 IA-64

Workaround

To work around this issue, disable the SMB2 protocol on the server that is running Windows 7 or Windows Server 2008 R2.

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

More Information

For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates

Additional file information

Additional file information for Windows 7 and for Windows Server 2008 R2

Additional files for all supported x86-based versions of Windows 7

File name X86_47494d63d28764dc707760442b3a3dda_31bf3856ad364e35_6.1.7600.21095_none_8056e0e1d5b6aa92.manifest
File version Not Applicable
File size 700
Date (UTC) 22-Nov-2011
Time (UTC) 14:36
Platform Not Applicable
File name X86_d5461f721a60c68531e17dbc06e99d22_31bf3856ad364e35_6.1.7601.21864_none_b0579dfeb3ee1023.manifest
File version Not Applicable
File size 700
Date (UTC) 22-Nov-2011
Time (UTC) 14:36
Platform Not Applicable
File name X86_microsoft-windows-smbserver-v1_31bf3856ad364e35_6.1.7600.21095_none_da4c6dfd70ed0e06.manifest
File version Not Applicable
File size 3,022
Date (UTC) 22-Nov-2011
Time (UTC) 06:22
Platform Not Applicable
File name X86_microsoft-windows-smbserver-v1_31bf3856ad364e35_6.1.7601.21864_none_dc5264416dfbd6ad.manifest
File version Not Applicable
File size 3,022
Date (UTC) 22-Nov-2011
Time (UTC) 06:09
Platform Not Applicable

Additional files for all supported x64-based versions of Windows 7 and of Windows Server 2008 R2

File name Amd64_88dd7fc20418bf45dc0e461edc9a1d83_31bf3856ad364e35_6.1.7600.21095_none_150234bfd7e96723.manifest
File version Not Applicable
File size 704
Date (UTC) 22-Nov-2011
Time (UTC) 14:36
Platform Not Applicable
File name Amd64_eed97488ac2ed21f18c474ad6283f983_31bf3856ad364e35_6.1.7601.21864_none_417a8b07c30f6d1e.manifest
File version Not Applicable
File size 704
Date (UTC) 22-Nov-2011
Time (UTC) 14:36
Platform Not Applicable
File name Amd64_microsoft-windows-smbserver-v1_31bf3856ad364e35_6.1.7600.21095_none_366b0981294a7f3c.manifest
File version Not Applicable
File size 3,026
Date (UTC) 22-Nov-2011
Time (UTC) 07:22
Platform Not Applicable
File name Amd64_microsoft-windows-smbserver-v1_31bf3856ad364e35_6.1.7601.21864_none_3870ffc5265947e3.manifest
File version Not Applicable
File size 3,026
Date (UTC) 22-Nov-2011
Time (UTC) 06:55
Platform Not Applicable

Additional files for all supported IA-64-based versions of Windows Server 2008 R2

File name Ia64_06baf634fba8764e082162341e9a4ffc_31bf3856ad364e35_6.1.7601.21864_none_4a8b0d6ab5de5ea1.manifest
File version Not Applicable
File size 702
Date (UTC) 22-Nov-2011
Time (UTC) 14:36
Platform Not Applicable
File name Ia64_8ce03f8aff9d0df3ff7412e6674a2d15_31bf3856ad364e35_6.1.7600.21095_none_c6f3f8760b38d149.manifest
File version Not Applicable
File size 702
Date (UTC) 22-Nov-2011
Time (UTC) 14:36
Platform Not Applicable
File name Ia64_microsoft-windows-smbserver-v1_31bf3856ad364e35_6.1.7600.21095_none_da4e11f370eb1702.manifest
File version Not Applicable
File size 3,024
Date (UTC) 22-Nov-2011
Time (UTC) 06:58
Platform Not Applicable
File name Ia64_microsoft-windows-smbserver-v1_31bf3856ad364e35_6.1.7601.21864_none_dc5408376df9dfa9.manifest
File version Not Applicable
File size 3,024
Date (UTC) 22-Nov-2011
Time (UTC) 06:43
Platform Not Applicable