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.

syslog and logrotate prob.

Discussion in 'General Discussion' started by ezztro, Aug 6, 2006.

  1. ezztro

    ezztro Well-Known Member

    Joined:
    Nov 11, 2003
    Messages:
    148
    Likes Received:
    0
    Trophy Points:
    16
    Hello,

    sorry for my bad english :)

    I have a prob with syslog, that logs some events to /var/log/messages.

    Every night at 4 am, syslog stops loggin this infos to /var/log/messages. i must restart syslog manualy everday with service syslog stop and service syslog start.

    4am is the same time, where logrotate is running. how can i fix this ? cpanel version latest edge.

    this prob is since the last stable version. system centos 4.3
     
  2. dave9000

    dave9000 Well-Known Member

    Joined:
    Apr 7, 2003
    Messages:
    891
    Likes Received:
    1
    Trophy Points:
    16
    Location:
    arkansas
    cPanel Access Level:
    Root Administrator
    known issue with any recent RH based OS when /tmp is set noexec
    follow the below instructions and it should fix the issue

    mkdir /mytmp

    then edit pico -w /etc/cron.daily/logrotate and set the TMPDIR so it looks like this:


    Code:
    #!/bin/sh
    TMPDIR=/mytmp
    export TMPDIR
    /usr/sbin/logrotate /etc/logrotate.conf
    EXITVALUE=$?
    if [ $EXITVALUE != 0 ]; then
    /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
    fi
    exit 0

    Then run /etc/cron.daily/logrotate and see if it works.
     
    #2 dave9000, Aug 6, 2006
    Last edited: Aug 6, 2006
Loading...

Share This Page