skip to Main Content

I am using Magento 1.9 CE and am having a cron issue. The Magento cron will not start and the error reports the following:

/home/magento/magento/cron.sh: line 48: /home/magento/magento/cron.php: Permission denied

I am logging in as user ‘magento’ and have created a crontab -e

*/5 * * * *  sh /home/magento/magento/cron.sh

Because cron.sh is having problems locating the PHP binary, I hard-coded that in the Cron.sh

PHP_BIN=`/opt/remi/php56/root/usr/bin/php`

I found this by performing a ‘which php’

My permissions on the cron.sh and cron.php are as follows:

-rw-rw-r--  1 magento magento   2946 Jun 12  2017 cron.php
-rw-rw-r--  1 magento magento   1683 Dec 20 11:45 cron.sh

Still getting the error message in the /var/mail/

 /home/magento/magento/cron.sh: line 48: /home/magento/magento/cron.php: Permission denied

2

Answers


  1. Looks like your files has no execution rights(just read-write). Try to set execution rights for this files(775 for example). I think it should help with your issue.

    Login or Signup to reply.
  2. wrong permission for sh script.

    chmod +x /home/magento/magento/cron.sh
    

    should do the job

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search