File locking not working on OS X Server with Windows clients

by John Rizzo

You may remember the reader report, "Mavericks ACL bug keeps Windows users locked out," where Windows users could no longer open server-based files after Macs had opened. Mark Gilbert seems to be having the opposite problem with OS X Server and Windows clients, where file locking doesn't work at all:

I'm researching an issue with Mac servers and Windows clients. Specifically I have a problem with Windows clients using Excel. Basically the locking of files isn't working, resulting in Windows clients and Mac clients being able to open the same file at the same time, Since Apple did away with SMB, I can't locate the smb.conf file to edit struck locking policies. FYI, the issue is Mac OS X Server 2.2.1 (on Mountain Lion ) and Windows 7/8 clients.

Gilbert is talking about Mountain Lion file sharing, which has some different fundamentals (and problems) than does Mavericks file sharing. When Gilbert says "Apple did away with SMB" (the file sharing protocol), what he means is that with Mountain Lion, Apple replaced the open source SMB code it had long been using with its own implementation.

With Mavericks, Apple added an implementation of SMB 2, and newer version of the file sharing protocol, and made it the default file sharing protocol. Mavericks workarounds to a host of problems often involve forcing the Mac client or OS X server to use SMB 1, which is essentially the same SMB that Mountain Lion uses.

Although Gilbert says that he "can't locate the smb.conf file," you can add an nsmb.conf file to OS X Server. This has been used with Mavericks. So he might be able to "edit struck locking policies," though I don't know what he is referring to.

There have been problems related to file locking the other way with Mavericks, where a Mac user touching a file changes the ACLs and locks out the Windows users permanently.

I don't have an answer for Gilbert, but I thought it was worth pointing out the similarities to these two different problems. If you have answer, .