Question about file locking

Jeremy Allison jeremy at valinux.com
Mon Jul 24 17:25:42 GMT 2000


"Rechenberg, Andy" wrote:

> Does an application have to request a lock before Samba will impose one?
> The reason I ask is because I'm trying to setup a box to serve files for a
> mostly Windows NT-based network (NT4SP5, and some Win95SR2 boxes) with Samba
> and everything is working fine (shows up in Net Hood, can browse fine, home
> directories show up) EXCEPT file locking.
> 
> Only some applications actually lock a file that is accessed (Word, Excel,
> AutoCAD, etc.).  If I use Notepad, Wordpad, or some other applications, no
> file lock is put in place.  I have file locking, and strict locking both set
> to "yes."

With strict locking Samba will place an fcntl lock over
a the region to be read/written just before doing so and
will unlock afterwards.

Remember that oplocks will skew the fcntl locks seen on
the UNIX box as if a client has oplocked a file it has
no need to send locking requests to the server.

Can you be more specific about any problems you are
seeing ?

Regards,

	Jeremy Allison,
	Samba Team.

-- 
--------------------------------------------------------
Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.
--------------------------------------------------------




More information about the samba-technical mailing list