Technical article 102432

"ls" fails to list contents of NFS mounted filesystem.

OpenServer 5.0.0

Written · Last revised

Problem

When an NFS 2.0 client tries to list files, using "ls", in some NFS mounted directories, the following error may occur:

ls: cannot get current working directory: Function not
implemented (error 89)

When running "make" this error may occur:

getcwd: (bu5)
The directory in question is exported by a non-SCO server or is
a non-SCO filesystem.  And, although ls fails, it is likely that
files can still be read and written using vi, touch, cat and other
utilities.

Cause

The HTFS and DTFS filesystems support "versioning".  A versioned
directory uses a technique in which information is stored 1GB down
the directory by using lseek(S).

There is a clash between the SCO implementation of versioning and some non-SCO UNIX filesystem types, where both use directory offsets of 1GB to store information. The test to see if a file is versioned is to simply lseek() to 1GB and check success. The "ls" command uses getcwd(S) which by default tests to see if the current directory contains versioned files, even though it should only do this if the environment variable SHOWVERSIONS is set to 1.

Solution

This problem was fixed in OpenServer 5.0.4.

From the Xinuos technical article database, record 102432. Reproduced with permission. The original is at www.sco.com/ta/102432, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.