InMotion Hosting Support Center

cron job blocked by Mod Security

Category: Databases

2013-11-05 11:03 am EST

Hits: 1,280
I wont run my script test2.php from cite
And get message:
<html><head><title>Error 406 - Not Acceptable</title><head><body><h1>Error 406 - Not Acceptable</h1><p>Generally a 406 error is caused because a request has been blocked by Mod Security. If you believe that your request has been blocked by mistake please contact the web site owner.</p></body></html>

You must login before you can ask a follow up question.

You must login before you can submit an answer.



11,186 Points
2013-11-05 11:47 am EST
While we would be unable to provide you with the exact rule that is blocking it via this public forum, I can help you resolve it. This can be resolved by simply turning off mod_security on your domain. The following article will assist you in doing so:
Disable mod_security via cPanel Modsec Manager

You must login before you can post a comment about this answer.

I turn off in Modsec Manager my sites. But I again have same error.
My command in cron job is : curl
73 Points
2013-11-05 12:24 pm EST
Hello SergeyGorbachov,

When you're running a cron job with the curl command, you'll want to be sure to specify a User-Agent string along with your URL to avoid any problems.

This is covered in our guide on running a cron job with curl. Basically your cron job command would need to look something like:

/usr/bin/curl --user-agent cPanel-Cron

Please let us know if you still encounter any issues at all.

- Jacob
9,968 Points
2013-11-05 12:59 pm EST
Like this Question?

Support Center Login

Our Login page has moved, Click the button below to be taken to the login page.

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!