Cron Job Permission Issue

Hi all,

I am trying to create my very simple cron job scheduled running every 10 mins, setup like this

/usr/local/php5/bin/php -f


<?php $mydir = dirname(__FILE__); ?>

But then I got following error

sh: line 1: /home//…/cron.php: Permission denied

Any reason why?


Could be any number of reasons, most probably a user permission issue.

It looks like cron.php is web accessible so just use curl to hit it from any user.

Do I just type following with curl prefix?

curl http://<>//cron.php

Do I need to add following to front?



cURL is located at /usr/bin/curl

/usr/bin/ is in the system PATH, which means using just “curl” is fine on the commandline (or in crontab).

The following two calls will give the same result:

The -s flag suppresses any output (–silent)