Windows 7 Clients are Locking Files

file-sharingfileswindows 7windows-xp

Since introducing Windows 7, we have a strange problem with locked files.

We have a VB6 Program stored on a server. Clients open the program from the share, and work with it all day. When we had updates, we simply renamed the file, and copied the new one. This has been working for us for over 10 years with NT, W2K and XP. Since introducing Win 7 this does not work anymore.

If I open Computer Management on the server, and look at the open files, they are all in “open mode” Read. If I use Hyena, it looks a bit different. The XP clients are in “open mode” Execute and the Win 7 clients in “open mode” Read. If I try to rename the file, I get a SHARING VIOLATION:

Desired Access:  Read Attributes, Delete, Synchronize 
Disposition:     Open 
Options:         Complete If Oplocked, Open Reparse Point 
Attributes:      n/a 
ShareMode:       Read, Write, Delete 
AllocationSize:  n/a 
Impersonating:   xxx\yyyyyy

If I terminate the Win 7 connections, leaving the XP connections, I can rename the file.

Here’s the Server side:
Windows Server 2003 R2 x64
Share Permissions are Read / Write
NTFS Permissions are List / Read / Execute

Any help would be greatly appreciated.

Thanks.

Best Answer

This is a known issue with the Redirected Driver Buffering Subsystem in Windows 7/2008 R2:

You cannot rename an application in a shared folder in Windows 7 or in Windows Server 2008 R2 if the application is being run by one or more users
http://support.microsoft.com/kb/2622136

"Consider the following scenario:

  • An application in a shared folder is being run by one or more users.

  • Note The application opens a handle to itself when it is being run. You try to rename the application on a computer that is running Windows 7 or Windows Server 2008 R2.

"In this scenario, you cannot rename the application. Additionally, you receive the following error message:

The file is in use by another process.

Notes

  • You can perform the same operation successfully after all users close the application.
  • This issue does not occur on a computer that is running Windows XP.

"This issue occurs because of changes that were made in the Redirected Drive Buffering Subsystem (Rdbss.sys) regarding the use of new oplocks and the way it handles references to remote executable files."


If you prefer a more recent version of rdbss.sys, it is available in this hotfix:

http://support.microsoft.com/kb/2687753

Related Topic