[Samba] Prevent read locks on shares

Jeremy Allison jra at samba.org
Wed Jan 27 23:55:48 UTC 2016

On Thu, Jan 28, 2016 at 10:47:51AM +1100, John Gardeniers wrote:
> Thanks Jeremy but I don't understand why the lock is being applied
> at all when it's not being asked for.

Oh, this is your application then, not an extrnal one ?

> Your advice to not disable locking if applications legitimately
> share file access to me seems to be the inverse of what is needed.
> After all, the fact that our application shares file access is the
> very reason we don't want file locking.

Remember, Windows does an implicit read-lock check
on every read from a file, and and implicit write
lock check on every write - so you get these locks
merely by doing read and write (a Windows server
does the same).

If you want to disable this set:

strict locking = no

(by default it is auto). See the man page
for details.

More information about the samba mailing list