The
locking
option can be used to tell Samba to engage or disengage server-side byte-range locks on behalf of the client. Samba implements byte-range locks on the server side with normal Unix advisory locks and will consequently prevent other properly-behaved Unix processes from overwriting a locked byte range.
This option can be specified per share as follows:
[accounting]
locking = yes
If the
locking
option is set to
yes
, the requestor will be delayed until the holder of either type of lock releases it (or crashes). If, however, the option is set to
no
, no byte-range locks will be kept for the files, although requests to lock and unlock files will appear to succeed. The option is set to
yes
by default; however, you can turn this option off if you have read-only media.