Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
This actually sounds like "working as intended" behavior. You're not supposed to be editing the same file from multiple clients at the same time, and Vista/Windows7/Server2008 are actually better about enforcing this best practice. That said, what's the exact problem? Your Win7 clients can't just save their updates by going "Save As..." and entering a new filename? –  HopelessN00b Aug 2 '12 at 12:51
    
Well the problem is that the clients are working with the executable. The executable file is not being edited, but replaced. There is no "Save as..." per se. –  Daro Aug 2 '12 at 13:52
    
So, it's a concurrent application access issue? You should note that in your question. –  HopelessN00b Aug 2 '12 at 13:57
    
No. There's no problem using the application concurrently. It's all about the locking. –  Daro Aug 2 '12 at 17:10

1 Answer 1

up vote 0 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.