The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

transferring an account breaks cron job

Discussion in 'General Discussion' started by schwim, Sep 16, 2008.

  1. schwim

    schwim Well-Known Member

    Joined:
    Aug 2, 2006
    Messages:
    198
    Likes Received:
    0
    Trophy Points:
    16
    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
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    User crons should be listed in the /var/spool/cron/ directory.

    cd /var/spool/cron
    cat *

    Should show them to you.

    Not sure why it didn't get moved over properly. Removing it from there and then readding it normally should work.
     
  3. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    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.
     
  4. schwim

    schwim Well-Known Member

    Joined:
    Aug 2, 2006
    Messages:
    198
    Likes Received:
    0
    Trophy Points:
    16
    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:

    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
     
  5. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  6. schwim

    schwim Well-Known Member

    Joined:
    Aug 2, 2006
    Messages:
    198
    Likes Received:
    0
    Trophy Points:
    16
    Thanks very much for your help, infopro. Fixing both locations solved my problem.

    thanks,
    json
     
  7. schwim

    schwim Well-Known Member

    Joined:
    Aug 2, 2006
    Messages:
    198
    Likes Received:
    0
    Trophy Points:
    16
    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
     
  8. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Is there any useful information the Apache logs from the cron request?
     
  9. schwim

    schwim Well-Known Member

    Joined:
    Aug 2, 2006
    Messages:
    198
    Likes Received:
    0
    Trophy Points:
    16
    Hi there Kenneth,

    I found this in my mod_sec log:

    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
     
  10. schwim

    schwim Well-Known Member

    Joined:
    Aug 2, 2006
    Messages:
    198
    Likes Received:
    0
    Trophy Points:
    16
    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
     
  11. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  12. JayLevine

    JayLevine Active Member

    Joined:
    Nov 25, 2002
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    New Mexico
    I'm having the same problem on a new cpanel box. Both with transfers and new accounts.

    I'm getting the 4755 message and jobs aren't running.

    Also have the same ownership problems with cron files.

    I've submitted a bug report.

    Bug 7833.

    http://bugzilla.cpanel.net/show_bug.cgi?id=7833

    Jay
     
Loading...

Share This Page