Re: cron path problem
> Hi guys,
>
> I have setup a cron job (on woody) to run apt-get update and apt-get install
> once a week to do security updates.
>
> I get the following:
>
> dpkg: `ldconfig' not found on PATH.
> dpkg: `start-stop-daemon' not found on PATH.
> dpkg: `install-info' not found on PATH.
> dpkg: `update-rc.d' not found on PATH.
> dpkg: 4 expected program(s) not found on PATH.
>
> I thought that cron would run as user cron, but there's no such user. Who
> does it run as? Or how can I set the path that cron has access to?
The user it runs as depends how you added it. Is it a specific user's
crontab? (Did you use 'crontab' command to submit it?) or did you
stick it /etc/cron.d?
Best way to fix path is to put it explicitly in the command you run as
in:
0 0 * * 1-5 sh -c 'PATH=$PATH:/sbin:/usr/sbin; apt-get update; apt-get install ...'
Alexis
Reply to: