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!

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,155
    Likes Received:
    39
    Trophy Points:
    178
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    834
    Likes Received:
    29
    Trophy Points:
    178
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    sneader likes this.
  3. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,155
    Likes Received:
    39
    Trophy Points:
    178
    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. :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #3 sneader, Feb 21, 2014
    Last edited: Feb 21, 2014
  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 am 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...
  5. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    834
    Likes Received:
    29
    Trophy Points:
    178
    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.
     
    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