File locking question

Mike Fedyk mfedyk at matchmail.com
Wed Dec 13 04:54:29 GMT 2000


Christoffer Perret wrote:
> 
> >We encounter the following error.
> >
> >Samba-share contains a Word document.
> >User 1 (Windows client) opens the document.
> >User 2 (Macintosh client) opens the same document.
> >User 2 is given write access, no file locking occurs.
> >
> >If you User 2 opens the file from a Windows client, he only
> >has read-access because locking occurs (wanted situation).
> >
> >Any thoughts?
> 
> Seems to me that you are using netatalk for Mac connectivity. If my memory doesn't play tricks on me, netatalk currently does not support file locking.
> 
> I haven't been able to test it myself, but maybe you could. What is the situation if two Macintosh clients try to access the same file after the first has opened it?
> 
> Christoffer Perret

Macs can't open the same file at the same time for write access with netatalk. 
Windows and macs can have the same file open for write!  win 2 win has locking,
mac 2 mac has locking, but mac 2 win has NO locking.

I've heard conflicting reports that netatalk uses flock or fcntl locking.  Fcntl
should propagate to samba, but I haven't checked the source to be sure.  Does
anyone know?

Mike




More information about the samba mailing list