Skip site navigation (1)Skip section navigation (2)
Date:      02 Jul 2003 10:16:53 -0400
From:      Lowell Gilbert <freebsd-questions-local@be-well.no-ip.com>
To:        freebsd-questions@freebsd.org
Cc:        ico@beke.info
Subject:   Re: crontab : exec, permission denied
Message-ID:  <44of0dc8tm.fsf@be-well.ilk.org>
In-Reply-To: <20030701191222.GA1132@beke.info>
References:  <20030629082956.GA1077@beke.info> <44fzlq8gtc.fsf@be-well.ilk.org> <20030701191222.GA1132@beke.info>

next in thread | previous in thread | raw e-mail | index | archive | help

ico <ico@beke.info> writes:

> >> I added to /etc/crontab this line:
> >> 
> >> */5     *       *       *       *       user1    /usr/local/bin/getmail \
> >> -r /usr/home/user1/.getmail/getmailrc
> >> 
> >> 
> >> I wanted getmail to pick-up mail for user user1. Result is error:
> >> exec: :permission denied
> >> 
> >> $ls -l /usr/local/bin/getmail
> >> r-xr-xr-x  1 root  wheel  328 Jun 22 07:41 /usr/local/bin/getmail*
> >> 
> >> I also tried to create user1's crontab ( su user1; crontab -e ) . Result is the
> >> same. What's wrong?
> >
> >Does it work from the command line?
> >The following works fine for me from my user crontab:
> >
> >6       6       *       *       1-7     /usr/local/bin/fetchmail -s
> >
> >
> 
> Yes it works, if i don't use crontab.

I think the problem is that /usr/local/bin isn't in the PATH for the
crontab.  The easiest fix is probably to add it, in the crontab file
itself (but make sure the change doesn't apply to any other entries,
for security reasons). 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44of0dc8tm.fsf>