Discussion:
getcwd() problem..
m***@ceid.upatras.gr
2006-06-14 09:53:24 UTC
Permalink
Hello people,
i have problem with the getcwd() function at -current .I get the following errors:
1.When i try to change directory:
chdir: error retrieving current directory: getcwd:
cannot access parent directories: No such file or
directory
getcwd: cannot access parent directories: No such
file or directory

2.When i try to use tab auto completion:
symlink-hook: error retrieving current directory:getcwd: cannot access parent
directories: No such file or directory

3.When i start up an xterm :
shell-init: error retrieving current directory: getcwd: cannot access parent
directories: No such file or directory

I cannot figure out if something (and why)is broken , if you have any ideas I
would be gratefull.Thnx and have a nice day.


Ilias Marinos

----------------------------------------------------
This mail was sent through http://my.ceid.upatras.gr
Johannes Weiner
2006-06-14 10:25:28 UTC
Permalink
Hello,

are you sure that the directory you are in, exists?
What happens after you log in? What says `ls -ld `pwd`' right after login?

Hannes
--
If the telephone rang today, water it!
Giorgos Keramidas
2006-06-14 10:52:46 UTC
Permalink
Post by m***@ceid.upatras.gr
Hello people,
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
getcwd: cannot access parent directories: No such file or directory
What are the steps you have taken to reach this point? We have to be
able to reproduce the same thing, if there is a bug somewhere.
Post by m***@ceid.upatras.gr
symlink-hook: error retrieving current directory:getcwd: cannot access parent directories: No such file or directory
When do you hit TAB? Have you logged in? What is the setting of your
HOME directory in /etc/passwd? Can you change directories if you use an
absolute pathname like:

# cd /
Post by m***@ceid.upatras.gr
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
It seems your HOME directory points to a location that doesn't exist.
Can you verify that /etc/passwd contains the right path, that this path
exists and that you do have the necessary permissions for that
directory?

- Giorgos
m***@ceid.upatras.gr
2006-06-14 11:29:16 UTC
Permalink
Hello Giwrgos,

I ' ve just read your reply and tried to check the points you gave me.
Post by Giorgos Keramidas
What are the steps you have taken to reach this point? We have to be
able to reproduce the same thing, if there is a bug somewhere.
That's a problem .I can't figure out how this problem occured.It was after a
normal boot without any error messages.Also, i want to note that i don't get
these errors everytime.For example now , after a reboot i can work
properly.(before i couldn't even start programs).It is strange.
Post by Giorgos Keramidas
When do you hit TAB? Have you logged in? What is the setting of your
HOME directory in /etc/passwd? Can you change directories if you use an
# cd /
Yeap, i am able to change directories while using absolute paths.I have
problems when i use tab (bash auto completion) and when i use . , .. links of a
dir which should be "linked" to the current and the parent directory.
Post by Giorgos Keramidas
It seems your HOME directory points to a location that doesn't exist.
Can you verify that /etc/passwd contains the right path, that this path
exists and that you do have the necessary permissions for that
directory?
bash$ cat /etc/passwd | grep marinosi
marinosi:*:1001:1001:Ilias Marinos:/home/marinosi:/usr/local/bin/bash

bash$ ls -ld /home/marinosi/ /usr/local/bin/bash
drwxr-xr-x 37 marinosi marinosi 2560 Jun 14 13:10 /home/marinosi/
-rwxr-xr-x 1 root wheel 594724 Mar 12 17:58 /usr/local/bin/bash

Seems ok..

Thnx again.

Ilias

----------------------------------------------------
This mail was sent through http://my.ceid.upatras.gr
Giorgos Keramidas
2006-06-14 11:56:05 UTC
Permalink
Post by m***@ceid.upatras.gr
Hello Giwrgos,
I' ve just read your reply and tried to check the points you gave me.
Post by Giorgos Keramidas
What are the steps you have taken to reach this point? We have to be
able to reproduce the same thing, if there is a bug somewhere.
That's a problem. I can't figure out how this problem occured.
It was after a normal boot without any error messages. Also, i
want to note that i don't get these errors everytime. For
example now, after a reboot i can work properly. (before i
couldn't even start programs). It is strange.
It _may_ have been caused by an unclean filesystem, but nothing
is sure at this point, since the system was rebooted. If this
was just an unclean filesystem (i.e. your /home), it has been
fsck'ed and the problem should be fixed now.
Brian Candler
2006-06-14 13:20:31 UTC
Permalink
Post by m***@ceid.upatras.gr
bash$ cat /etc/passwd | grep marinosi
marinosi:*:1001:1001:Ilias Marinos:/home/marinosi:/usr/local/bin/bash
bash$ ls -ld /home/marinosi/ /usr/local/bin/bash
drwxr-xr-x 37 marinosi marinosi 2560 Jun 14 13:10 /home/marinosi/
-rwxr-xr-x 1 root wheel 594724 Mar 12 17:58 /usr/local/bin/bash
Seems ok..
Also check: ls -ld / /home

You're not using NFS or other remote filesystem mounts for /home are you?

If not, then I can't explain why this is happening intermittently. I only
see the symptoms you describe if the directory I'm currently in has been
deleted.

Loading...