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.

logrotate failed to rename

Discussion in 'General Discussion' started by kernow, Aug 21, 2016.

Tags:
  1. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    A server on CL 7 cPanel 58 is starting to send out the following mails:
    Code:
    /etc/cron.daily/logrotate:
    error: failed to rename /usr/local/cpanel/logs/dnsadmin_log to /usr/local/cpanel/logs/dnsadmin_log-20160821: Operation not permitted
    error: failed to rename /usr/local/cpanel/logs/error_log to /usr/local/cpanel/logs/error_log-20160821: Operation not permitted
    error: failed to rename /usr/local/cpanel/logs/stats_log to /usr/local/cpanel/logs/stats_log-20160821: Operation not permitted
    error: failed to rename /usr/local/cpanel/logs/tailwatchd_log to /usr/local/cpanel/logs/tailwatchd_log-20160821: Operation not permitted
    error: error running last action script for /usr/local/cpanel/logs/*_log
    Any idea what's up?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    The logrotate application installed on your system should not be used to rotate cPanel log files. Check to see if "/etc/logrotate.d/cpanel" exists, and if so, remove that file and configure log rotation for these logs separately via "WHM >> Home >> Service Configuration >> cPanel Log Rotation Configuration".

    The size threshold for these log files is configurable via the "Log rotation size threshold" option under the "Stats and Logs" tab in "WHM >> Home >> Server Configuration >> Tweak Settings".

    Thank you.
     
  3. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Thanks for answering Michael. Yes /etc/logrotate.d/cpanel did exist, We have removed it now.
    cPanel Log Rotation Configuration is already configured to rotate the logs so all should be OK now.
    Thanks.
     
    cPanelMichael likes this.
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page