Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What's causing "getcwd" errors?

2 views
Skip to first unread message

Matt

unread,
Sep 20, 1997, 3:00:00 AM9/20/97
to

Hi,

I'm having problems with my users (and my weekly run output) getting
errors like:

shell-init: could not get current directory: getcwd: cannot access
parent directories

job-working-directory: could not get current directory: getcwd: cannot
access parent directories

(they're from the "rebuilding locate database" section of my weekly run
output)

My users also get similar errors when logging in, changing dirs, listing
dirs, etc. It doesn't cause problems ALL the time (a plain "cd" will
make it show the correct directory in the prompt, etc) though the error
line is showed all the time.

I assume it's all do with getcwd. Anyone know why this is happening? If
so, please Cc a reply to my email address. Thanks.

Cya,

--
Matt Bruce
Xm...@techie.comX
NB: Remove X's to email me (anti-spam)

J Wunsch

unread,
Sep 20, 1997, 3:00:00 AM9/20/97
to

Xm...@techie.comX (Matt) wrote:

> I'm having problems with my users (and my weekly run output) getting
> errors like:
>
> shell-init: could not get current directory: getcwd: cannot access
> parent directories

Unless somebody really removed the current working directory of the
process while it was running (which is possible), the best suspicion
would be that one of your mointpoints (like /usr) has mangled
permissions. That's nothing you could see while something is mounted
on it. Bott single-user, and make sure all mount points have at least
permissions 555.

--
cheers, J"org

joerg_...@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)


Conrad Sabatier

unread,
Sep 24, 1997, 3:00:00 AM9/24/97
to

In article <600jvh$4...@uriah.heep.sax.de>,

J Wunsch <joerg_...@uriah.heep.sax.de> wrote:
>Xm...@techie.comX (Matt) wrote:
>
>> I'm having problems with my users (and my weekly run output) getting
>> errors like:
>>
>> shell-init: could not get current directory: getcwd: cannot access
>> parent directories
>
>Unless somebody really removed the current working directory of the
>process while it was running (which is possible), the best suspicion
>would be that one of your mointpoints (like /usr) has mangled
>permissions. That's nothing you could see while something is mounted
>on it. Bott single-user, and make sure all mount points have at least
>permissions 555.

I had the same problem a while back after I had gone a bit overboard with
permission settings (trying to tighten security), and in addition to
correcting the permissions as Joerg says, I also modified each user's
profile (not their ~/.profile file, but their /etc info) to use
/usr/home/whatever instead of the symlink /home/whatever. Not sure if the
latter was really necessary, though.
--
Conrad Sabatier | FreeBSD -- UNIX for your PC
http://www.neosoft.com/~conrads | Why settle for less than the best?
Spambots, use this: bit...@f-u.org | http://www.freebsd.org

0 new messages