transferring an account breaks cron job

schwim

Well-Known Member
Aug 2, 2006
213
0
166
Hi there everyone,

I have an account that I transferred from one server to another that had a cron job. Once moved, it quit working and now I get an error every night that it didn't complete because it's trying to grab a URL that doesn't exist(it's not the URL I entered on the other server).

So I logged into the account to modify the cron job, but the problem is that the cron job is not listed there. No cron jobs are listing. For clarification, the cron daemon is running it, it's just not listed under the account.

How can I get to this entry to delete it so I can create one that will be listed under the user account?

thanks,
json
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
79
458
cPanel Access Level
Root Administrator
Check the owner ship of the files in the /var/spool/cron directory. The individual files should be owned by the account name.
 

schwim

Well-Known Member
Aug 2, 2006
213
0
166
Hi there and thank you both for your help.

I checked /var/log/cron and everything there was owned by root. I changed the owner and grp to the user, but logging into the user's panel still shows no change(I can't see their job).

When going to the cron panel, I did find this at the bottom of the page:

/usr/bin/crontab permissions are wrong. Please set to 4755
When I checked it, it states that it's already at 755. It treats it like a file, and not a dir, so I'm not sure what the 4755 is...

Any suggestions would be welcome :)

thanks,
json
 

schwim

Well-Known Member
Aug 2, 2006
213
0
166
Thanks very much for your help, infopro. Fixing both locations solved my problem.

thanks,
json
 

schwim

Well-Known Member
Aug 2, 2006
213
0
166
Well, I own the cron job now, but unfortunately, it still doesn't work.

Here's my cron command:

Which ran just fine for a year or so on the old server. Now, however in my nightly report, I get the following:

Not Acceptable

An appropriate representation of the requested resource /index.php could not
be found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an
ErrorDocument to handle the request.
_________________________________________________________________


Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.8b mod_auth_passthrough/2.1
mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.6 Server at www.site.com
Port 80
If I run the URL in the browser, it works as intended. I'm wondering if maybe mod_sec or another hardening action is causing my problem.

Any thoughts would be appreciated.

thanks,
json
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
79
458
cPanel Access Level
Root Administrator
Well, I own the cron job now, but unfortunately, it still doesn't work.

Here's my cron command:



Which ran just fine for a year or so on the old server. Now, however in my nightly report, I get the following:



If I run the URL in the browser, it works as intended. I'm wondering if maybe mod_sec or another hardening action is causing my problem.

Any thoughts would be appreciated.

thanks,
json
Is there any useful information the Apache logs from the cron request?
 

schwim

Well-Known Member
Aug 2, 2006
213
0
166
Hi there Kenneth,

I found this in my mod_sec log:

2008-09-23
00:00:01
1.1.1.1
/index.php?module=tRSSNews HTTP/1.0
www.site.com
Access denied with code 406 (phase 2). Match of "rx ^apache.*perl" against "REQUEST_HEADERS:User-Agent" required. [file "/usr/local/apache/conf/modsec2.user.conf"] [line "60"] [id "990011"] [msg "Request Indicates an automated program explored the site"] [severity "NOTICE"]
So I guess the mystery is solved in regards to what's causing the problem, but is there a way to keep this from happening without removing the checks in mod_sec?

thanks,
json
 

schwim

Well-Known Member
Aug 2, 2006
213
0
166
Hi there guys,

Sorry for the bump and I realize that it's not a cPanel problem, but does anyone have an idea(other than disabling the check in mod_sec) on how to get my cron job to succeed in loading the page in a text browser?

thanks,
json