[Samba] file locking
jra at samba.org
Fri Sep 23 19:14:24 GMT 2005
On Sat, Sep 24, 2005 at 04:33:30AM +0530, Pramathesh Ambasta wrote:
> I am sure this is a subject which has been discussed a lot already. I have
> been looking for pointers but have failed. So please bear with me and help.
> A linux box runs Samba and is connected to a win box. One word or excel file
> is opened simultaneoulsy on both (on the linux system in OpenOffice and on
> the win system in M$Office). How do I prevent simultaneous writes on both
> machines? What I want is that one system gets r-w access and the other read
> Is this a samba issue or is it an issue which the application program must
> I have enabled strict locking and disabled oplocks.
> what more do I need to do?
This depends on what locks a Windows version takes, or if it relies
on share modes to detect other openers. If it just uses share modes,
then the linux oo client will not conflict, as the OO2.0 code uses
a POSIX fcntl byte range write lock over an open file (as tested on my SuSE 9.3
system with OO2.0) to detect other openers.
If the OO Windows client also uses byte-range locks then it should be able
to detect already open files on the Linux box (and vica-versa).
More information about the samba