file locking question: Unix/NT environment

Simo Sorce simo.sorce at xsec.it
Fri Oct 18 23:15:00 GMT 2002


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20021018/65b3c7d4/attachment.bin


More information about the samba-technical mailing list