Cronjob: permission denied

Hello everybody,
I will be very thankfull for any help to solve this problem.
My project installed in subfolder and url is mysite.mydomain.com.
Can't setup crontab for this project, error: " /bin/sh: /usr/bin/GET: Permission denied ".
But it is working fine for root directory installation.
Any clue?.

Thanks in advance.

What does the troublesome crontab entry look like? Or are you saying you can't edit your crontab?

i tried different entries

0 0 * * * GET http://www.mysite.mydomain.com/cronjob.php > /dev/null

0 0 * * * GET http://www.mydomain.com/mysite/cronjob.php > /dev/null

it can be that the crontab setup is not enables for ur username. tell the root to make a cron for you. and then u can easily make crons.

go to /var/adm/cron directory.
cat the contents of cron.allow and check if user name u are using is there or not.
if not add the username .

Check that:

  • Your user is "cron-enabled".
  • You edit your user's crontab using "crontab -e"
  • "GET" seems to be an executable file (binary or script), so check that it has execution enabled for your cron user.
    Regards.

Based on the error message: error: " /bin/sh: /usr/bin/GET: Permission denied ".

Crontab interprete GET as a unix command and run a which on GET. However, GET does not exist, I believe on any setted PATH or /usr/bin.

Solution: If GET is executable script.. Hard coded the path to GET in your crontab.

I do not agree. If GET didn't exsist, the error would be "file not found" or something like that. I think it's a matter of perms. Most probably just a "chmod 755 /usr/bin/GET" will fix it or give another error :slight_smile:

Ok, may be I have to chmod 755 first of all.
Just a reminder:
When i install my script in root directory - i have no errors with cronjob at all. But i need it to install it in subdomain.

You right, I jump into conclusion too fast.. However, just put in the whole path if chmod does not work.

Well...
Still can't resolve the issue..
I will pay $20 for working solusion.

We're not witholding help, but you've given us little to work with. What have you tried to resolve this issue?

Can you show us ls -l /usr/bin/GET please?

I am not a Pro at whole shebang of Unix things...
Do you you mean:
GET http://www.mysubdomain.mysite.com/cronjob.php > /dev/null

i receive:

/bin/sh: /usr/bin/GET: Permission denied

I mean exactly what I typed, ls -l /usr/bin/GET. Type it into your shell and tell me what it says, please.

Here , a little easier,
at your unix prompt:

host> cd /usr/bin
host> ls -l | grep GET

Did you do this (And all the other things said here)?

Could you explain this? What does "install it in a subdomain" mean?

How this becomes little easier :stuck_out_tongue:

command by C688 is a direct one, fetching what is needed.

Atleast this could have been something without knowing the directory in which the command is available.

ls -l `which GET`