Paul,
The problem you have is due to Windows caching the directory
information.
Windows thinks it lives in a windows world and doesn't like to play with
other
people. Because the file is being changed at the Unix level, windows
doesn't see
the changes because it didn't make them. It still believes that it
hasn't changed the file
so therfore the file hasn't changed!
Now there are two ways to get around this, refer to thge following info
on file caching.
file cacheing
Some people report problems with
"cacheing"
of data. Generally the bug report
goes like this:
- create a file on a unix box
- view the file on a PC via Samba
- change the file on the unix box
- look at the file again on the PC via
Samba and the changes are not visible
The first thing to realise is that this is
the expected behaviour! The SMB protocol
uses a thing called "opportunistic
locking". This allows the client to "safely"
do client side cacheing of file data. The
problem is that this cacheing is only
safe if all programs access the files via
SMB. As soon as you access the data
via a non-SMB client then you will get data
inconsistencies.
The solution is simple! Disable oplocks in
smb.conf for those shares that need
to be accessed simutaneously from unix and
windows. See the "oplocks" and
"veto oplock files" options in
smb.conf(5)
Samba-1.9.18 and the samba-2.x series
support oplocks.
Samba-1.9.17 series does NOT.
In addition, you may care to explore the
effect of making the following registry
entries under MS Windows NT4:
==================================================================================
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Paramete
rs]
"BufFilesDenyWrite"=dword:00000000
"BufNamedPipes"=dword:00000000
"UseOpportunisticLocking"=dword:00000000
"DormantFileLimit"=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Paramete
rs\Linkage]
"UtilizeNtCaching"=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Filesystem]
"Win95TruncateExtensions"=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanManServer\Parameters]
"EnableOpLockForceClose"=dword:00000001
"EnableOpLocks"=dword:00000000
=================================================================================
The following registry entry may help under
Windows 9X also:
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\VREDIR]
"DiscardCacheOnOpen"=string:00000001
Message: 5
From:
To: samba@samba.org
Date: Wed, 23 Aug 2000 15:23:39 +0800
Subject: Files Updates
Hi,
I have an Informix program that unload data to a file in a samba
directory.
Problem is although the file has changed, I still see the old data from
my
Windows 98 SE PC. I only see the updated data after refreshing the
snmba
directory numerous times. Sometimes I have to wait for more that 10
minutes !!
Funny thing is this problem does not apply to my friend's PC.
Why is this so and remedies? Appreciate your early reply. Thank you.
Regards,
Paul Chung
--
__________________________________________________________________
Scott Lawson
Systems Manager
Department Of Information Services
St. George's Hospital Medical School
Tooting
London SW17 0RE
UK
P: 44 (0)208 725 2896
F: 44 (0)208 725 3583
mailto:s.lawson@sghms.ac.uk
http://www.sghms.ac.uk
__________________________________________________________________