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!

/usr/local/cpanel/logs/access_log deleted by mistake

Discussion in 'General Discussion' started by simpliq, Nov 11, 2014.

  1. simpliq

    simpliq Registered

    Joined:
    Nov 11, 2014
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello,

    I've deleted by mistake the access_log file on my number 1 server.
    I noticed on server number 2 that the file has " ASCII text, with very long lines " encoding.
    How to fix this ?

    Regards,
    Razvan Vlaicu
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello :)

    You can re-create this log file via:

    Code:
    touch /usr/local/cpanel/logs/access_log
    By default, ownership is set to "root:root" and permissions are set to 0600.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. sarhosting

    sarhosting Well-Known Member

    Joined:
    Oct 1, 2007
    Messages:
    164
    Likes Received:
    2
    Trophy Points:
    68
    Location:
    United States
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hi cPanelMichael. Two questions for you.
    1. Do you have to restart the cPanel Service once the file is recreated?
    2. Is the old information reimported into the log or does it start anew?

    Thanks alot.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. paknode

    paknode Registered

    Joined:
    Aug 10, 2015
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Pakistan
    cPanel Access Level:
    Root Administrator
    1. Do you have to restart the cPanel Service once the file is recreated?
    No way it doesn't need to restart your server as it just create a file so file creation is not like updating kernel on kvm server.

    2. Is the old information reimported into the log or does it start anew?
    The log starts with fresh content.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello :)

    Right, you don't have to restart cPanel, and the old data is permanently removed when the file is manually deleted.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. sarhosting

    sarhosting Well-Known Member

    Joined:
    Oct 1, 2007
    Messages:
    164
    Likes Received:
    2
    Trophy Points:
    68
    Location:
    United States
    cPanel Access Level:
    Root Administrator
    Twitter:
    Thanks to you both.
     
    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