[Samba] How do I lock a shared file?

steve steve at steve-ss.com
Thu Sep 5 10:25:15 MDT 2013


On Thu, 2013-09-05 at 14:40 +0200, Helmut Hullen wrote:
> 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.

Hi
Yeah, the lesson plan is a good idea!

LibreOffice locks files as you'd expect:) Nothing else works though. I'm
amazed that no one else has encountered this before.

Cheers,
Steve




More information about the samba mailing list