file locking question: Unix/NT environment

Jinhai Yang jyang at triant.com
Sat Oct 19 00:01:02 GMT 2002


Thanks Simo,

About the OS, the Windows side is Windows 2000, the Unix side is Tru64 5.1a
(the OS for the DEC-->Compaq-->HP Alpha box). The disk is local to the Unix
box, not a NFS mounted volume though. Does that make a difference?

-Jinhai

-----Original Message-----
From: samba-technical-admin at lists.samba.org
[mailto:samba-technical-admin at lists.samba.org]On Behalf Of Simo Sorce
Sent: Friday, October 18, 2002 6:14 PM
To: Jinhai Yang
Cc: samba-technical at lists.samba.org
Subject: Re: file locking question: Unix/NT environment


It really depends on which OS you are using.

Currently only linux 2.4.x (whith x something > than 4 I think) and IRIX
latest kernels have support for kernel oplocks and the ability to share
locks beetween samba and nfs.


On Sat, 2002-10-19 at 00:28, Jinhai Yang wrote:
> We have some files on a Unix/Samba server which the users can access from
> both the Unix side and Windows NT side. We'd like to implement file
locking
> on these files for client applications which could run from both the unix
> boxes and the NT boxes. However, I cannot seem to get it right.
>
> On NT, we used:
> 	...
> 	_locking( fd, LK_LCK, 100L );
> 	...
> On Unix, we used:
> 	...
> 	fcntl(fd, F_SETLKW, &fl);
> 	...
>
> The NT clients can lock out each other, the Unix clients can also lock out
> each other. However, a NT client CANNOT lock out a Unix client, and vice
> versa.
>
> Am I using the right call? Is there something I missed? Or is there
> something in samba.conf I should tweak?
>
> I'm fairly new to Samba, thanks for any help.
>
> -----------------------------
> Jinhai Yang
> Triant Technology Inc.
--
Simo Sorce - simo.sorce at xsec.it
Xsec s.r.l.
via Durando 10 Ed. G - 20158 - Milano
tel. +39 02 2399 7130 - fax: +39 02 700 442 399




More information about the samba-technical mailing list