Nick Couchman
2014-Jan-07 16:44 UTC
[Samba] File Locking on Samba & Terminal Server 2008R2
Resurrecting an issue that's been discussed several times, but with no apparent solution...Windows Terminal Server attempts, with multiple users, to re-use the same connections to remote SMB/CIFS servers. This causes a few problems with file locking in Samba, particularly in our environment, where users might legitimately open multiple files with the same name, but different network locations. Samba reports files that are locked by other users when, in fact, they are different files and should have different locks. Once upon a time, there was a registry parameter (Win2k - 2003, I suppose) called MultiUserEnabled that allowed you to adjust the behavior of Windows in this regard. However, several indications (from Microsoft TechNet pages) are that this particular option was not rolled into Server 2008/2008R2. An HP article from the Windows NT 4 days had several work-arounds, but none of these are practical. Things like using multiple NetBIOS aliases so that Windows sees the servers as different, options that could be used with security=share, and then adjustments to the maximum number of open file handles. Unfortunately, we're not dealing with the 2048 open files issue, anymore, it's about file locking. Anyone have any solutions/suggestions for this problem, since MS dropped that particular registry fix? Thanks, Nick -------- This e-mail may contain SEAKR Engineering (SEAKR) Confidential and Proprietary Information. If this message is not intended for you, you are strictly prohibited from using this message, its contents or attachments in any way. If you have received this message in error, please delete the message from your mailbox. This e-mail may contain export-controlled material and should be handled accordingly.
Jeremy Allison
2014-Jan-07 18:14 UTC
[Samba] File Locking on Samba & Terminal Server 2008R2
On Tue, Jan 07, 2014 at 09:44:36AM -0700, Nick Couchman wrote:> Resurrecting an issue that's been discussed several times, but with no apparent solution...Windows Terminal Server attempts, with multiple users, to re-use the same connections to remote SMB/CIFS servers. This causes a few problems with file locking in Samba, particularly in our environment, where users might legitimately open multiple files with the same name, but different network locations. Samba reports files that are locked by other users when, in fact, they are different files and should have different locks. > > Once upon a time, there was a registry parameter (Win2k - 2003, I suppose) called MultiUserEnabled that allowed you to adjust the behavior of Windows in this regard. However, several indications (from Microsoft TechNet pages) are that this particular option was not rolled into Server 2008/2008R2. > > An HP article from the Windows NT 4 days had several work-arounds, but none of these are practical. Things like using multiple NetBIOS aliases so that Windows sees the servers as different, options that could be used with security=share, and then adjustments to the maximum number of open file handles. Unfortunately, we're not dealing with the 2048 open files issue, anymore, it's about file locking. > > Anyone have any solutions/suggestions for this problem, since MS dropped that particular registry fix?I don't know of *any* existing bugs in Samba's handling of file locking - whether over a multi-user connection or not. Can you point to a *specific* example of what you consider a file locking bug please ? Jeremy.