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

Re: error message:shel-init: cannot get working directory



This error occurs when a user shell task (from su -c ...) starts in a 
directory which it is unable to read.

I traced the cron.daily example to the updatedb script, which runs the 
command 'su nobody -c "/usr/bin/updatedb ..... " '.

cron runs in /var/spool/cron, which is readable only by root:
$ ls -ld /var/spool/cron
drwx------   2 root     root         1024 Oct  9  1995 /var/spool/cron

As a result, the shell running the script /usr/bin/updatedb gets an error
when it calls the function getcwd() [that function walks the tree by tracing
inode numbers, so needs to get the inode number of the directory '.']

I fixed that (on a RedHat system) by putting a 'cd /tmp' into the script
/etc/cron.daily/updatedb.cron.

Check the permissions on all the directories from / to the user home
directories (presumably / and /home).  Make sure that they are all at least
world-readable


Tim

On Tue, 26 Aug 1997 04:16:34 GMT, Hamish Moffatt <hmoffatt@mail.com> wrote:
>On Mon, Aug 25, 1997 at 11:00:48AM -0700, mray01@ccsf.cc.ca.us wrote:
>> 
>> Not too long after installing Debian 1.3.? from cheapbytes I now get :
>> 
>> shel-init: cannot get working directory : getcwd: cannot access parent
>> directories
>> 
>> This is only with user accounts. Root doesn't do this.
>
>I was getting this from cron.daily for a while; seems to have stopped
>now, I don't remember if I fixed anything or not.
>
>
>Hamish
>-- 
>Hamish Moffatt, StudIEAust                                 hmoffatt@mail.com
>Student, computer science & computer systems engineering.    3rd year, RMIT.
>http://hamish.home.ml.org/ (PGP key here)             CPOM: [*****     ] 53%
>Your train has been cancelled due to defective government at Spring Street..
>
>
>--
>TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
>debian-user-request@lists.debian.org . 
>Trouble?  e-mail to templin@bucknell.edu .
>


-- 
Tim Frost, Systems Engineer         Email: Tim.Frost@nz.eds.com
EDS (NZ) Ltd,                       Voice: +64 4 495-0504
P.O. Box 3647,                      Fax:   +64 4 495-0473
Wellington, New Zealand.


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: