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.

Not a directory: /etc/cron.hourly

Discussion in 'General Discussion' started by bidouilleur, May 7, 2006.

  1. bidouilleur

    bidouilleur Well-Known Member

    Joined:
    Apr 27, 2003
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    since a few days I have 2 servers sending me each hour a root mail from cron daemon with the line you see in title...

    they both are running

    WHM 10.8.0 cPanel 10.8.2-R80
    CentOS 4.3 i686 - WHM X v3.1.0

    I had a look in terminal there is a directory, owned by root and I couldn't see anything wrong with permissions

    I looked in this forum and a little wider on the net but I couldn't find any topic with this issue

    I don't consider myself as an expert but still... Can't make head nor tail of this

    Anything I can do to solve or give you more elements to help me solve this issue ?

    One is an AMD and the other a P4, only commen is Centos basically and cpanel

    thanks for your help

    eric
     
  2. avijit

    avijit Well-Known Member

    Joined:
    Jul 26, 2004
    Messages:
    116
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Whats in the body and the header of the message ?
     
  3. bidouilleur

    bidouilleur Well-Known Member

    Joined:
    Apr 27, 2003
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    here is the complete mail with all details, just took out some names and mails to avoid spammer to increase the wrok of my anti spamfilter ;)

    thanks for your help and time

    eric
     
  4. avijit

    avijit Well-Known Member

    Joined:
    Jul 26, 2004
    Messages:
    116
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    It seems the some of the cron files palced in that directory has errors Make sure that files under that directory has the permissions 755 and ownership of roots.
     
  5. bidouilleur

    bidouilleur Well-Known Member

    Joined:
    Apr 27, 2003
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    a little late but short of time.. in the meantime the problem still occurs

    I have checked the file permission, it is 755, it is owned by root..

    the only cron in there is modsecparse.pl and when I run it manually, I get no errors...

    Nothing on cron log indicating prolems

    any idea what is causing this problem ?? Is there something I can do to uncover the error if any ????
     
  6. bidouilleur

    bidouilleur Well-Known Member

    Joined:
    Apr 27, 2003
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Sorry to bump this topic but I'm stuck and nothing I try helps

    no one ever had this or has an idea what could create this behaviour ?

    thanks for your ideas
     
  7. bmcgrail

    bmcgrail Well-Known Member

    Joined:
    Dec 8, 2003
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    the command in your email is

    Code:
    run-parts /etc/cron.hourly
    Try entering that on the command line and see what happens.

    If that works track down where cron is running it from, delete the line and re-type it. Maybe a hidden character is messing it up? Sounds unlikely, but I've seen it happen.

    If that doesn't work, try moving cron.hourly to cron.hourly.bak and making a new cron.hourly directory.

    Good luck, hope this helps.
     
  8. bidouilleur

    bidouilleur Well-Known Member

    Joined:
    Apr 27, 2003
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    I made a new directory cron.hourly and moved the cron in there.
    That didn't solve the problem

    I traced run-parts to /usr/bin/

    Now I have no clue what is triggering that script. opening the script confirms that it is indeed via this that the error mail comes :

    if [ ! -d $1 ]; then
    echo "Not a directory: $1"
    exit 1
    fi


    that's the part sending the error

    But now, how do you trace how and who triggered it ?

    i opened crontab .....but according me there is nothing triggering this...

    7 0 * * * /scripts/upcp
    0 1 * * * /scripts/cpbackup
    */15 * * * * /usr/local/cpanel/whostmgr/bin/dnsqueue > /dev/null 2>&1
    2,58 * * * * /usr/local/bandmin/bandmin
    0 0 * * * /usr/local/bandmin/ipaddrmap
    10 13 * * * cd /usr/local/cpanel/whostmgr/docroot/cgi/fantastico/scripts/ ; /usr/local$
    11 4 * * * /usr/local/cpanel/whostmgr/docroot/cgi/cpaddons_report.pl --notify
    0 6 * * * /scripts/exim_tidydb > /dev/null 2>&1
    */5 * * * * /usr/local/cpanel/bin/dcpumon >/dev/null 2>&1


    am at a loss.... any idea what triggers this run-parts ?
     
  9. xprt5

    xprt5 Well-Known Member

    Joined:
    Apr 6, 2003
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Houston
    run-parts cron.hourly is run by cron from the /etc/crontab file

    There is a run-parts entry for hourly, daily, weekly and monthly.
     
  10. bidouilleur

    bidouilleur Well-Known Member

    Joined:
    Apr 27, 2003
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Problem solved as follows, might be interesting for someone having same issue

    It is indeed in /etc/crontab that the problem occured, though we couldn't find out why

    Kevin (Thanks man) from support fiddled around and basically deleted the lines in that file and retyped it.... and gone is the problem... as said something in the line was bad but what ?? I looked afterwards closely on the other server and compaired the lines from the now working crontab and the 'corrupt' one and couldn't find anything different, even counted spaces etc.....

    Anyway, I copied the content, rm crontab, touch crontab and pasted the content back in and .... no errors anymore...

    Well a few others pop up now since that is running back normal but... that's maybe for another topic ;)

    In any case, once again a thanks to Kevin for his help.
     
Loading...

Share This Page