Cron job permission denied

Avatar
  • Answered
I set up a cron job in Cpanel according to instructions from my CMS software but received this email alert:
/usr/local/cpanel/bin/jailshell: /usr/bin/wget: Permission denied

The cron I tried to run was:
wget --tries=1 --timeout=99999 -0 cron.txt http://www.example.com
Avatar
JacobIMH
Hello BradCraw, and thanks for your question. If you are trying to run a cron job on shared hosting, it's important to note that wget is disabled for security reasons. You can instead utilize curl if you need to download a remote file, being sure to also define a user-agent so that it doesn't trip a ModSecurity error:

/usr/bin/curl --user-agent CronJob --retry 1 --max-time 60 -o cron.txt http://example.com

Please let us know if you're still having any issues at all. - Jacob