bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: shell-init: error retrieving current directory: getcwd: cannot acces


From: LynnOS
Subject: Re: shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
Date: Fri, 18 Jul 2008 10:01:18 +0800

Thanks ,but after I export PWD,the problem doesn't go
the following is my step:


root@Linux-vserver:~# export
declare -x EDITOR="/bin/vi"
declare -x HOME="/root"
declare -x LD_LIBRARY_PATH="/usr/lib:/lib"
declare -x LOGNAME="root"
declare -x MAIL="/var/mail/root"
declare -x OLDPWD
declare -x OPIEDIR
declare -x
PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:"
declare -x PS1="\\u@\\h:\\w\\\$ "
declare -x PWD="/root"
declare -x PYTHONHOME="/usr/lib/python2.5"
declare -x PYTHONPATH="/usr/lib/python2.5:/usr/lib/python2.5/lib-dynload"
declare -x QPEDIR
declare -x QTDIR
declare -x SHELL="/bin/bash"
declare -x SHLVL="1"
declare -x SSH_CLIENT="172.26.26.200 1593 22"
declare -x SSH_CONNECTION="172.26.26.200 1593 172.26.26.106 22"
declare -x SSH_TTY="/dev/pts/0"
declare -x TERM="vt100"
declare -x USER="root"
root@Linux-vserver:~# su lynn
shell-init: error retrieving current directory: getcwd: cannot access parent
directories: Permission denied
lynn@Linux-vserver:/root$




2008/7/17 Chet Ramey <chet.ramey@case.edu>:

> > *"You might be able to avoid the need for the getcwd call at startup by
> > exporting PWD*"
> >
> > Sorry,would you give us more details about how to avoid the "error"
> message
>
> export PWD
>
> Bash performs a check at startup in which it compares $PWD to `.' and skips
> the call to getcwd if the two refer to the same device and inode.  File
> permissions may still keep you from being able to stat $PWD, but it's worth
> a shot.
>
> Chet
>
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
>
> Chet Ramey, ITS, CWRU    chet@case.edu
> http://tiswww.tis.case.edu/~chet/ <http://tiswww.tis.case.edu/%7Echet/>
>



-- 
OpenEmbedded,Linux vserver,Python


reply via email to

[Prev in Thread] Current Thread [Next in Thread]