Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    920
    Likes Received:
    13
    Trophy Points:
    168
    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?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    920
    Likes Received:
    13
    Trophy Points:
    168
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    cPanelMichael likes this.
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    I'm happy to see the issue is now resolved. Thank you for updating us with the outcome.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice