SUMMARY: getcwd() problem

From: Colin J. Wynne (
Date: Sat Oct 05 1996 - 12:35:34 CDT


I am not sure I am confident in having it `figured out', but here

Original problem was as follows: programs would fail in automounted
(namely /home) directories with the epithet, `Can't get current
working directory.' Indeed, a two line test program that did getcwd()
and printed the resulting pathname spat out the empty string.

The basic suggestions were as follows:

  1) Make sure umask for process calling automountd is correct, and on
     a related note, make sure that underlying mount-points have
     correct permissions. This was not my problem, as all permissions
     were set correctly.

  2) Automountd had timed out the directory in question and unmounted
     it. This was not the case either, because I could run a command,
     say `ls ~' to force remounting of the directory even if it had
     been unmounted, verify its status as mounted vie e.g. df or
     mount, and *still* get the getcwd() problem.

  3) had been messed with while automountd was
     running. I think this is the winner. Indeed, at some point I
     had repopulated NIS+ tables from the main server, which include
     automountd map tables. No information in the maps had actually
     changed (I was just to leazy so I repopulated all the tables...),
     but the actual map *had* been replaced while the daemon was
     running. I have not seen the problem again since I last
     restarted automountd, so we'll see if this was really the case.

Thanks to
  Glenn Satchell <>,
  Lyle Miller <>,
  Rasana Atreya <>,
  Kris Briscoe <>,
  Matt Bottrell <>,
  Brett Lymn <>,
  Trevor Paquette <>
for their responses.


- --
    /\ Colin J. Wynne Johns Hopkins University
   (()) Dep't of Mathematical Sciences
  /____\ ``Lunatic-at-Large'' E-Mail:
/________\ Sturgeon's Law:
                      Ninety Percent of everything is crap.

Version: 2.6.2


This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:11 CDT