[Samba] locking in samba

Demchenko Yevheniy zheka at uvt.cz
Mon Sep 1 19:20:23 GMT 2003


On Friday 29 August 2003 16:32, John H Terpstra wrote:
> On Fri, 29 Aug 2003, Arjen wrote:
> > I have been trying to get this together for a long time, tried many
> > options and combinations of options, and have not been able to get it to
> > work. If you or anyone else can enlighten Demchenko and me on this
> > subject, it would definitely be appreciated.
> >
> > My conclusion for now is "It is not possible"...
>
> Have you read the Samba-HOWTO-Collection.pdf fro the Samba-3.0.0 RC1 or
> RC2 docs directory?
>
> Chapter 14 is dedicated to the subject. If you have read it your feedback
> would be appreciated.
>
> Cheers,
> John T.

I did read carefully chapter 14 of Samba-HOWTO, but found no answer to this 
particular issue. Actually, i didn't understand completely, how does locking 
work in samba. Chapter 14 describes quite well how oplocks work, but there is 
almost no information about "normal" (deny modes) locking. Assume, that 
oplocks are off. How is file being locked? Should the application ask for 
lock of should samba lock the file (for writing) automatically if application 
opens it R/W? 
Anyway, if i turn strict locking=yes, how is it possible, that file is opened 
for writing by several clients?
And the main question is: "How can i configure samba to deny opening files for 
writing from more than one client?"
May be, it is underlying OS issue?

Thanks,
Yevheniy.
>
> > Arjen.
> >
> > Demchenko Yevheniy wrote:
> > >Hello! I've got into problems with simultaneous access to files on samba
> > >server. Two (or more) people from different computers may open the same
> > > file and may independently change it (with openoffice, for example).
> > > Certainly, this is not the expected behavior. If the file is shared on
> > > windows machine, when the first user opens it, he gots RW permission,
> > > while the next one(s) may open this file only as read-only.
> > >Tried on Samba3.0 alpha22, Samba3.0beta1 and Samba3.0rc1.
> > >blocking locks, posix locking and locking are set to yes in smb.conf,
> > > 'force user' is not set.
> > >smbstatus says "Denymode DENY_NONE, oplocks NONE" on every connection to
> > > the mentioned file.
> > >I've tried to switch on/off oplocks, level2 oplocks, kernel oplocks,
> > > strict locking, - nothing helps.
> > >What am i missing?
> > >Thanks.
>
> --
> John H Terpstra
> Email: jht at samba.org




More information about the samba mailing list