Re: Samba locking directories


Subject: Re: Samba locking directories
From: Tim Jordan (timothy_jordan@labor.state.ak.us)
Date: Wed Nov 26 2003 - 10:44:49 AKST


Hey Justin,

"Opportunistic file locking is a unique Windows file locking feature".
It's not really locking but caching the file locally then when another
user requests access to the file the first client must break the ops
lock and write back to the original file. This is where the problems
start.

You may want to look into the "oplocks", try defining this at the share
level for testing. Data coruption is possible so backup.

oplocks = false
level2 oplocks = false

At the file level it would be:
[share-name]
veto oplocks files = /path/file.ext

Most likely if your problem continues you should disable oplocks on your
clients and the samba server. For windows this is a reg hack, for Samba
it's a paramter in smb.conf
(If you want the reg hacks let me know and I'll post them)

Are you using "force user" in the smb.conf? If so you will want to
disable op locks.

Problems have also been found with faulty network hardware (nic,
switch,router, etc).

Finally, "If files are shared between Windows clients, and either local
UNIX or NFS users, turn opportunistic locking off". - Official Samba-3
Reference Guide

You may want to download the HowTo from samba.org.

Good Luck,
Tim
On Tue, 2003-11-25 at 19:19, Justin Dieters wrote:

> Hey all. I set up a Samba server a couple days ago, with several
> Windows XP & 98 client machines. Sometimes, seemingly at random, it
> will 'write lock' a directory. This can happen when a person already
> has files open read/write, but then when they try and save, it won't let
> them. But then they can go to another directory and save it. It never
> seems to happen to just certain files, but a whole directory (along with
> subdirs and subfiles) at a time.
>
> All the files seem to have the same user/group ownership and the same
> access modes (rw for everyone). Also, the folder can be written to by
> other people on the network with no problem. This 'write lock' seems to
> go away after a while, meaning if the person just closes all their files
> out of that folder and then goes back a couple hours later, it works
> fine again.
>
> So far I have only seen this on a couple of the Windows XP machines, so
> I don't know if this is a problem on 98 as well or not. I'm not sure
> what exact version of Samba it is, but it's whatever comes with RedHat
> 9.0, so it is fairly recent.
>
> Any ideas on what the problem might be? I don't have a lot of
> experience with Samba - I'm doing most of my configuration stuff for it
> through Webmin - but this is the only big problem I've encountered so far...
>
> Thanks,
> Justin
>
> ---------
> To unsubscribe, send email to <aklug-request@aklug.org>
> with 'unsubscribe' in the message body.
>

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.



This archive was generated by hypermail 2a23 : Wed Nov 26 2003 - 10:44:45 AKST