The most primitive locks available to Samba are deny-mode locks, known as
share modes, which are employed by programs such as text editors to avoid accidental overwriting of files. For reference, the deny-mode locks are listed in
Table 5.9.
Deny any read-only open requests on the current file.
DENY_WRITE
Deny any write-only open requests on the current file.
DENY_DOS
If opened for reading, others can read but cannot write to the file. If opened for writing, others cannot open the file at all.
DENY_FCB
Obsolete.
The
share
modes parameter, which enforces the use of these locks, is enabled by default. To disable it, use the following command:
[accounting]
share modes = no
We highly recommend against disabling the default locking mechanism unless you have a justifiable reason for doing so. Most Windows and DOS applications rely on these locking mechanisms in order to work correctly, and will complain bitterly if this functionality is taken away.