Access Logs missing from ~username/access-logs

sneader

Well-Known Member
Aug 21, 2003
1,178
57
178
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
 

vanessa

Well-Known Member
PartnerNOC
Sep 26, 2006
833
28
178
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.
 
  • Like
Reactions: sneader

sneader

Well-Known Member
Aug 21, 2003
1,178
57
178
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. :)
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
I am happy to see the issue is now resolved. Thank you for updating us with the outcome.