I'm adding a new cronjob using the command command:
/bin/sh: /home/gbtusyll/public_html/run.php
But the command doesn't run and i get a mail stating:
/bin/sh: /home/gbtusyll/public_html/run.php: Permission denied
What is the problem?
What does * mean in Cron? The asterisk * is used as a wildcard in Cron. * sets the execution of a task to any minute, hour, day, weekday, or month.
To fix the permission denied error in Linux, one needs to change the file permission of the script. Use the “chmod” (change mode) command for this purpose.
Show activity on this post. When your computer is shut down (or the cron daemon is otherwise not running), cron jobs will not be started. If you have jobs that you would like to run after the fact during those times when the computer is shut down, use anacron.
Use php /home/gbtusyll/public_html/run.php
instead to run it as a PHP script instead of a regular shell script.
try
chmod +x run.php
also ensure that proper owner is set (i.e. if you are logged as user, if the owner of the file is 'user' - you can do it for example by running ls -la
careful: this might be very dangerous on production evironment, however I believe this would solve your development problem. You should read more about permissions later on
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With