[Mono-list] silly samba/nt4/cygwin problem

Martin Baulig martin@gnome.org
19 May 2002 01:22:50 +0200


cwitty@newtonlabs.com (Carl R. Witty) writes:

> I've seen behavior like this using Samba with "oplocks = True" (which
> is the default, I believe).  Basically, Samba serves files in a way
> that tells the Windows box that it is allowed to cache pieces; this
> works if all modifications are made through Samba, but fails if some
> modifications are made directly on the Linux box.  It can happen that
> the Windows box will see one sector from an old version of the file
> and another sector from a new version; if you changed the file size,
> this can manifest as what looks like a few characters added or deleted
> at the sector boundary, which will often cause syntax errors.
> 
> To disable this Samba behavior (which will reduce performance, but
> restore correctness for modifications made from the Linux side), add a
> line:
> 
>    oplocks = False
> 
> to an appropriate place in your smb.conf.  (Either in the [global]
> section or in the section for your share.)

Hi,

thanks a lot for the info !

Actually, when I installed Samba, I was a bit confused about the `oplocks'
option - the name `<something>lock' gave me the impression that it's for
locking access to a file - to avoid data corruption if it's enabled.

-- 
Martin Baulig
martin@gnome.org