Problem
A UNIX file has been created on my SCO OpenServer system. This file resides in a directory on an HTFS filesystem that is part of an SCO Advanced File and Print Server share resource. This file is then copied to an AFPS client PC's local hard disk. Subsequently, the UNIX file is re-edited on the SCO OpenServer server using an editor such as vi(c). If the file is again copied to the local PC disk using the Microsoft Windows for Workgroups File Manager, it appears that the original copy is overwritten as prompted. However, on inspection, with (for example) Microsoft Notepad, the actual contents of the file have not changed.
Cause
The PC client application, such as Notepad, opens its local copy of the UNIX file or document using "opportunistic locking". The server does this on the client's behalf. With a file locked, the client can cache read and write to the file. The opportunistic lock (oplock) is broken when another application modifies the file and the initial client connection is forced to close the file. However, the Advanced File and Print Server is not aware that, in the meantime, another UNIX process has opened, written and closed the same file. The client workstation does not actually close the file after the initial read although the application itself may be then closed.
Solution
Turn off opportunistic locking on the Advanced File and Printer Server.
Log in as the root user.Stop the Advanced File and Print Server:
#net stop server#cd /usr/net/servers/lanman
#vi lanman.ini...
...
under the [lmxserver] section, add;useoplock=noRestart the Advanced File and Print Server:
#net start serverNOTE: Without client opportunistic locking, there will be a potential
impact on performance. To a large degree, it is dependent upon
the overall system setup and set of applications. See also
SCO Advanced File and Print Server System Guide, Appendix B, page 215.