[Samba] file locking options in smb.conf

Volker Lendecke Volker.Lendecke at SerNet.DE
Tue May 5 11:49:18 GMT 2009


On Tue, May 05, 2009 at 04:27:30AM -0700, Anoop P.A. wrote:
> Hi Volker,
> 
> Thanks for the reply. 
> I want basic file locking work as expected. ( i.e. I want to prevent files from getting corrupted while shared across multiple platforms).
> If some file is opened writing in one client, other clients should not be able to write in to it. 
> 
> My server failing in many scenarios, I could explain one of the scenario as follows.
> 
> 1. Opened a share using browser in Win XP machine. 
> 2. Mounted same share in a Linux machine through nfs.
> 3. Initiated a 1 GB file transfer to share in windows
> 4. Same time tried to copy a file with same name in nfs share.It asked to overwrite existing file( I expect it not to start copy as write lock of that file is being obtained by CIFS client)
> 5. After a while both the transfers finished. MD5SUM showed resultant file got corrupted.

No way you will achieve this cross-protocol. Unix just does
not know how to lock a complete file like Windows/CIFS does
using share modes. Your only chance is to only use Samba and
a cifs client file system and ditch NFS and local file
access.

Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba/attachments/20090505/be88b0fc/attachment.bin


More information about the samba mailing list