[Samba] How do I lock a shared file?

Helmut Hullen Hullen at t-online.de
Thu Sep 5 06:40:00 MDT 2013

Hallo, steve,

Du meintest am 05.09.13:

>>> School classes often have projects with files that many students
>>> will need to edit.


>> Also, nobody forces applications to keep files open while
>> they are edited. For example even some Windows native editor
>> (I don't remember which) loads files into memory and closes
>> the file until saving.

> It's a pity that we'll have to work around it. Surely Samba knows if
> a file is open or not doesn't it?  What's all this oplock stuff? It
> would be useful if we could have an option for smb.conf like:
>  lock open files = Yes
> I realise that it's not for everybody. Would that be hard to
> implement?

Perhaps you need another tool than a text editor which is designed for  
"one man (m/f), one work". I'd test some wikis for such a job. But then  
still there is the problem with two pupils (or other persons) one  
filling the document and the other deleting word for word.

Programmers for data bases know this problem ...

And just for demonstration: group all pupils around the whiteboard or  
blackboard in the class room, let them create and edit one text on this  
board, everybody with a piece of chalk and a wiping cloth.

Viele Gruesse!

More information about the samba mailing list