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.

Access Logs missing from ~username/access-logs

Discussion in 'General Discussion' started by sneader, Feb 21, 2014.

  1. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    I have at least one user where access logs are not being kept in /home/username/access-logs/. If the user goes to cPanel and clicks on the Access Logs icon, they ARE able to download logs just fine. But usually they are also available in /home/username/access-logs/

    Is there a script or something I can run to "reset" this so that they are kept/accessible in that directory?

    - Scott
     
  2. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    817
    Likes Received:
    22
    Trophy Points:
    18
    Location:
    Virginia Beach, VA
    cPanel Access Level:
    DataCenter Provider
    I've seen this issue before, specifically when users try to access files in here through FTP or file manager. First, check the symlink to make sure it's actually linked to /usr/local/apache/domlogs/$domain. Last time I encountered this I just ended up creating a bind mount from the domlogs to another folder in the user's account to get around it. Didn't mess with it enough to see why the symlink couldn't be followed. I can look into it more if you need.
     
    sneader likes this.
  3. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    Ack, that was it. The symlink was pointing to a prior username... there was some domain or username change on this account a while ago, and something must have gone wrong.

    Thanks for pushing me in the right direction!!

    - Scott

    - - - Updated - - -

    Here is what I did to fix it.

    1) cd /home/username

    2) Confirmed that the symlink was pointing to the wrong domlog directory.

    3) Removed the bad symlink:
    rm access-logs

    4) Created symlink to the correct user domlog directory:
    ln -s /usr/local/apache/domlogs/username/ access-logs

    5) Since I did this as root, I had to change the ownership of the symlink:
    chown -h username.username access-logs

    Of course, substituted the actual account username for the word 'username' in these examples. :)

    Now Scott 2016 can find this the next time it happens. :)
     
    #3 sneader, Feb 21, 2014
    Last edited: Feb 21, 2014
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  5. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    817
    Likes Received:
    22
    Trophy Points:
    18
    Location:
    Virginia Beach, VA
    cPanel Access Level:
    DataCenter Provider
    Ahh - glad to see that fixed it. It wasn't so easy for me last time. Thanks for posting your resolution, too. I'm sure it will help others.
     
Loading...

Share This Page