[Samba] File Locking on Samba & Terminal Server 2008R2

Jeremy Allison jra at samba.org
Tue Jan 7 11:14:07 MST 2014

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 ?


More information about the samba mailing list