shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

get this error
‘shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory’ when doing stuff on my linux box.

after searching around, the problem is caused by my current directory is not exists. i must be delete it on other console, but my current console is still on that directory.

the resolve is simple go to a valid directory, simple type ‘cd’ will do.


# apachectl configtest
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Syntax OK
# cd
# apachectl configtest
Syntax OK

Leave a comment