[Samba] [Fwd: File Locking and Permissions Issue]

Scott Lovenberg scott.lovenberg at gmail.com
Thu May 15 10:34:35 GMT 2008

Michael Heydon wrote:
> Jack Lauman wrote:
>> <snip>
>> I compared the open files with one computer in Lacerte vs. two
>> computers in Lacerte and noticed one thing peculiar: when one computer
>> is using Lacerte, all files are opened with exclusive+batch oplocks
>> including Data1i07.dbf, however when 2 computers are running Lacerte, a
>> few files open without oplocks, notably data1i07.dbf.
> I'm assuming that both users need to write to these files? Maybe I'm 
> missing something but this seems to be entirely expected behaviour.
> Oplocks allow a client to cache data rather than having to constantly 
> sync to the server, obviously if there is more than one client doing 
> this things break.
> You could use fake oplocks to grant oplocks to all clients, but unless 
> the application is designed for it (which I doubt it is) you will just 
> wind up corrupting your data.
> If the application is regularly opening and closing files (and 
> therefore possibly being granted oplocks and then having them broken) 
> you might find that performance improves by disabling oplocks 
> altogether (well, performance for multiple users, performance for a 
> single user would suffer).
>> <snip> I've attached both files to this message.  Any help in 
>> resolving this
>> matter would be greatly appreciated.
> I think the list strips non-text attachments, so no excel file. Not 
> that I think it's terribly important since it sounds like your system 
> is working exactly as it should.
>> Thanks,
>> Jack Lauman
> *Michael Heydon - IT Administratorr *
> michaelh at jaswin.com.au <mailto:michaelh at jaswin.com.au>
Just a thought, but if you're using an enterprise distro, you might be 
able to cheat the system by granting fake oplocks and using a 
distributed file system, but there still could be coherency and race 
conditions under some circumstances.  It would probably depend on your 
usage patterns for the application as to whether you could push the 
envelope and get away with it.  If your access is mostly write once and 
read thereafter, it might be alright.  YMMV.

I've always had issues with Office 2000 and multiple users.  You can 
almost feel the whiplash of Access or Excel slowing down the moment a 
second connection is established.  Though, I must admit, I've never had 
corruption due to concurrent access, so it at least works for the speed 
trade-off.  Unless the app slows down to a crawl, it's probably better 
safe than sorry.  Especially if you're potentially rolling a corrupted 
file in to your backups.

More information about the samba mailing list