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.

Repair /usr/local/cpanel/logs/access_log empty file

Discussion in 'General Discussion' started by blue_wings, Mar 12, 2012.

  1. blue_wings

    blue_wings Registered

    Joined:
    Mar 12, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hy,

    I had a huge log (105MB size) in /usr/local/cpanel/logs/access_log and I wanted to start with a new file.
    So in SSH (I have a VPS) I renamed the old file and created a new one with the name access_log. These are the commands run in the SSH console:
    Code:
    mv access_log access_log_old
    touch access_log
    Now the file is empty and doesn't record anything (I tested again and again). I checked the owner and permissions and everything is fine (as a reference I have other VPS with cPanel and I checked there). Tried to delete new file and rename back the old file but still nothing...it appears as no logs are recorded now.

    Can you help me? What may be wrong here?

    Thanks!
     
    #1 blue_wings, Mar 12, 2012
    Last edited: Mar 12, 2012
  2. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,279
    Likes Received:
    36
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    You need to restart the cpanel service if you do that with a cpanel log.

    As root (and assuming an RH/CentOS system):

    service cpanel restart

    Mike
     
  3. storminternet

    storminternet Well-Known Member

    Joined:
    Nov 2, 2011
    Messages:
    462
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Try restarting syslog with command.

    Instead deleting file it is better to setup log rotation cPanel Log Rotation Configuration
     
  4. blue_wings

    blue_wings Registered

    Joined:
    Mar 12, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thank you, it worked. :D
     
Loading...

Share This Page