David J. Reiter
1998-Dec-15 20:57 UTC
Why does oplocks = False not seem to stop file cacheing?
Greetings All, I have tried everything I can think of and can not seem to stop the PC from cacheing a local copy of a file retrieved over a samba share. I have tried oplocks = false and also setting veto oplocks = /*.txt/ Whatever I try the PC still shows me the old version of a file after I modify it on the unix side. If anyone can see anything wrong with my smb.conf file please let me know. Thanks in advance, David. ; Configuration file for smbd. ; ===========================================================================[global] printing = sysv printcap name = /etc/printcap load printers = yes keepalive = 60 guest account = nobody socket options = TCP_NODELAY username map = /opt/samba/lib/umap read prediction = False oplocks = no debug level = 11 lock directory = /opt/samba/lib/locks kernel oplocks = no ole locking compatibility = no share modes = yes locking = yes strict locking = yes [pc] path = /NEWPC public = yes only guest = yes writable = yes printable = no ; I have tried share modes both yes and no, that doesnt seem to ; change anything. share modes = no ; I think setting oplocks False should do the trick but it doesn't ; seem to help. oplocks = False ; So I tried to set veto to veto all files, but again this didn't ; seem to help any. veto oplock files = /*.txt/
James Thompson
1998-Dec-15 21:08 UTC
Why does oplocks = False not seem to stop file cacheing?
On Wed, 16 Dec 1998, David J. Reiter wrote:> > [pc] > path = /NEWPC > public = yes > only guest = yes > writable = yes > printable = no > ; I have tried share modes both yes and no, that doesnt seem to > ; change anything. > share modes = no > ; I think setting oplocks False should do the trick but it doesn't > ; seem to help. > oplocks = False > ; So I tried to set veto to veto all files, but again this didn't > ; seem to help any. > veto oplock files = /*.txt/ > >from mine (don't remember what sync does so it might not be needed) [office] sync always = yes oplocks = no ->->->->->->->->->->->->->->->->->->---<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-< James Thompson 138 Cardwell Hall Manhattan, Ks 66506 785-532-0561 Kansas State University Department of Mathematics ->->->->->->->->->->->->->->->->->->---<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<
David J. Reiter
1998-Dec-15 23:04 UTC
Why does oplocks = False not seem to stop file cacheing?
Hi James, I took the smb.conf file you sent me and made the following two changes from your file: username map = /usr/local/samba/lib/umap guest account = guest I then restarted the server. Unfortunately I still get the same behavior. It must be something small I am missing but I can't figure it out. I was running samba 2.0 beta 4 but then switched back to version 1.9.18p10. On the PC side I am running Windows 95 (4.00.950) and Novell NetWare Client 32 (Maybe Novell has something to do with it). Well If you can think of anything else I might try please let me know. Thanks for your help so far. David. (I am including the output of testparms at the end of this, maybe it will give somebody a clue) On Tue, 15 Dec 1998, James Thompson wrote:> On Tue, 15 Dec 1998, David J. Reiter wrote: > > > > Thanks for the advice. I tried it out but I still got the same > > behavior. If you can think of any other parameter please let > > me know. Thanks, > > > > Thats the exact same problem I had and someone sugested the two options I > sent you which fixed my problem. Here's a complete section of my smb.conf > I'm running Samba version 1.9.18p10. I hate to ask but you did restart > the daemons after changing oplocks from False to no ? > > [global] > ;Tuning Parameters > dead time = 3 > socket options = TCP_NODELAY > ;Domain Logon Setup > os level = 2 > domain master = yes > preferred master = yes > domain logons = yes > logon script = network.bat > security = user > password level = 8 > wins support = yes > ;File system info > preserve case = yes > ;Printing > printing = sysv > printcap name = /usr/local/samba/printcap > ; load printers = yes > ;Misc > guest account = ftp > server string = KSU Mathematics Samba Server > > ; This next option sets a separate log file for each client. Remove > ; it if you want a combined log file. > log file = /usr/local/samba/log.%m > > ; You will need a world readable lock directory and "share modes=yes" > ; if you want to support the file sharing modes for multiple users > ; of the same files > ; lock directory = /usr/local/samba/var/locks > ; share modes = yes > > [homes] > allow hosts = 129.130.6. > comment = Home Directories > browseable = no > read only = no > create mode = 0750 > preserve case = yes > sync always = yes > oplocks = no >Here is the output from testparms Load smb config files from /usr/local/samba/lib/smb.conf Processing section "[homes]" Loaded services file OK. Press enter to see a dump of your service definitions # Global parameters debuglevel = 2 syslog = 1 syslog only = No protocol = NT1 security = USER max disk size = 0 lpq cache time = 10 announce as = NT encrypt passwords = No update encrypted = No getwd cache = Yes read prediction = No read bmpx = Yes read raw = Yes write raw = Yes use rhosts = No load printers = Yes null passwords = No strip dot = No interfaces = bind interfaces only = No networkstation user login = No password server = socket options = TCP_NODELAY netbios name = netbios aliases = smbrun = /usr/local/samba/bin/smbrun log file = /usr/local/samba/log.%m config file = smb passwd file = /usr/local/samba/private/smbpasswd hosts equiv = preload = server string = KSU Mathematics Samba Server printcap name = lpstat lock dir = /usr/local/samba/var/locks root directory = / default service = message command = dfree command = passwd program = /usr/local/samba/bin/smbpasswd passwd chat = *old*password* %o\n *new*password* %n\n *new*password* %n\n *changed* passwd chat debug = No valid chars = workgroup = WORKGROUP username map = /usr/local/samba/lib/umap character set = logon script = logon path = \\%N\%U\profile logon drive = logon home = \\%N\%U remote announce = remote browse sync = socket address = 0.0.0.0 homedir map = announce version = 4.2 max log size = 5000 mangled stack = 50 max mux = 50 max xmit = 65535 max packet = 65535 name resolve order = lmhosts host wins bcast packet size = 65535 password level = 8 username level = 0 keepalive = 0 deadtime = 3 time offset = 0 read size = 16384 shared mem size = 102400 coding system = client code page = 850 os level = 2 max ttl = 14400 max wins ttl = 259200 min wins ttl = 21600 lm announce = Auto lm interval = 60 dns proxy = Yes wins support = Yes wins proxy = No wins server = preferred master = Yes local master = Yes domain master = Yes domain logons = Yes browse list = Yes unix realname = No NIS homedir = No unix password sync = No time server = No ole locking compatibility = Yes printer driver file = /usr/local/samba/lib/printers.def # Default service parameters comment = copy = include = exec = postexec = root preexec = root postexec = alternate permissions = No revalidate = No default case = lower case sensitive = No preserve case = Yes short preserve case = No mangle case = No mangling char = ~ browseable = Yes available = Yes path = username = guest account = guest invalid users = valid users = admin users = read list = write list = volume = force user = force group = read only = Yes max connections = 0 min print space = 0 create mask = 0744 force create mode = 00 directory mask = 0755 force directory mode = 00 set directory = No status = Yes hide dot files = Yes delete veto files = No veto files = hide files = veto oplock files = guest only = No guest ok = No print ok = No postscript = No map system = No map hidden = No map archive = Yes locking = Yes strict locking = No share modes = Yes oplocks = Yes only user = No wide links = Yes follow symlinks = Yes sync always = No strict sync = No mangled names = Yes fake oplocks = No printing = sysv print command = lp -c -d%p %s; rm %s lpq command = lpstat -o%p lprm command = cancel %p-%j lppause command = lpresume command = queuepause command = disable %p queueresume command = enable %p printer = printer driver = NULL printer driver location = hosts allow = hosts deny = dont descend = magic script = magic output = mangled map = delete readonly = No dos filetimes = No dos filetime resolution = No fake directory create times = No [homes] comment = Home Dir browseable = No read only = No create mask = 0750 oplocks = No sync always = Yes hosts allow = 137.51.150. [IPC$] comment = IPC Service (KSU Mathematics Samba Server) path = /tmp status = No guest ok = Yes
Andrej Borsenkow
1998-Dec-16 08:13 UTC
Why does oplocks = False not seem to stop file cacheing?
> > Whatever I try the PC still shows me the old version of a file > after I modify it on the unix side. If anyone can see anything > wrong with my smb.conf file please let me know. Thanks in > advance, >Do you mean, you open file on PC (e.g. with notepad), then _close_ it on PC, modify on Unix, open _again_ on PC and still see the old content? I just did it on samba-2.1prealpha from WinNT and it works O.K. Oplocks have nothing to do with it, as they are hold only as long as file is open. If it does not work for you - what OS/version etc do you have? If you mean, you have file _opened_ on PC, modify on Unix, and wonder, why it is not changed on PC - this is normal. Why should it change on PC? PC has no way to know, that file was modified on Unix and never tries to update it. As far as PC is concerned, file was fully read. The point in setting oplocks off is to let _Unix_ see changes made on PC - not other way round. /andrej
David J. Reiter
1998-Dec-16 15:51 UTC
Why does oplocks = False not seem to stop file cacheing?
On Wed, 16 Dec 1998, Andrej Borsenkow wrote:> > > > Whatever I try the PC still shows me the old version of a file > > after I modify it on the unix side. If anyone can see anything > > wrong with my smb.conf file please let me know. Thanks in > > advance, > > > > > Do you mean, you open file on PC (e.g. with notepad), then _close_ it on PC, > modify on Unix, open _again_ on PC and still see the old content? I just did > it on samba-2.1prealpha from WinNT and it works O.K. Oplocks have nothing to > do with it, as they are hold only as long as file is open. If it does not > work for you - what OS/version etc do you have?Yes this is what I mean. We are running samba on a sparc 10/Solaris 2.5.1 machine. The PC is running Win 95, and also has novelle netware. I have seen the sambe behavior running samba 2.0 beta 4 and 1.9.18p10. If you have any ideas what might be causing the problem please let me know, Thanks, David.> > If you mean, you have file _opened_ on PC, modify on Unix, and wonder, why > it is not changed on PC - this is normal. Why should it change on PC? PC has > no way to know, that file was modified on Unix and never tries to update it. > As far as PC is concerned, file was fully read. > > The point in setting oplocks off is to let _Unix_ see changes made on PC - > not other way round. > > /andrej > > > >