[Samba] SAMBA 3.0 : files lock from Linux client

Frédéric Pierron frederic.pierron at thales-is.com
Tue Nov 18 12:27:40 GMT 2003


Hello,

My Samba 3.0 server has the Red Hat 7.3 OS.
My clients have the Red Hat 7.3 OS too.
On the client, my C program works on a local mounted directory with
smbmount that matches a samba shares on the server. My program just uses
fopen and fclose to work on shared files.
I have tested if fopen(w) prevents any write access on a shared files to
the other client. It doesn't !!
I ran 2 fopen with 2 differents users on the same shared file. The last
program who writes will win.

>From a Windows client, fopen will lock write access (with samba option
oplocks=yes).
Do you know any way (samba parameters) to prevent 2 concurrent write
access on the same shared files without being obliged to code a lock
management in my C program (by dot files and so on...) ?
Thank you for your help.

Fred





More information about the samba mailing list