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

Nick Couchman Nick.Couchman at seakr.com
Thu Apr 17 17:18:50 MDT 2014


> 
> smbd uses the dev_t/ino_t pair as an index
> into our file sharing/locking databases.
> 
> Are /storage/doc_checkout/usera/document1.doc
> and /storage/doc_checkout/userb/document1.doc
> actually the same file on the file system ?
> 
> If not then I'm at a loss as to how they
> can conflict at all, unless you're getting
> a locking/sharing violation from the Windows
> client redirector.
> 
> Do you ever see an error message coming back
> from Samba in the wireshark trace ?
> 
> Jeremy

Well, it's been a while, but I am able to reproduce this issue successfully.  I have the following paths on my Samba server:

/storage/user1/temp
/storage/user2/temp

My share (\\server\checkout) points to /storage/%U, so each user connects to \\server\checkout and gets his own individual directory.

In each of these folders I create a file called "LockDoc1.doc".  I use "ls -i" to verify that the indoe is, indeed, different.  I log in to the terminal server under the user1 account, open the document, then log in under the user2 account and try to open the document, and I get a message that the document is already in use by user1 and I can open read-only or wait for it to become available.  All of the connections to the server come in under the same PID.

Since I'm able to reproduce it, I'll grab some debug logs and PCAPs and see what I can find.

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.


More information about the samba mailing list