How does cPanel zip the access-logs symlink?
I am trying to access the current (active) raw access logs in cPanel through SSH. For that, I found out that the access-logs symlink:
needs to be zipped. Zip is installed on the server but I am unable to zip the access-logs symlink. I have so far tried:
which returns:
I have also tried using the --symlink option of zip but to no avail. Now I did run a "top -c" whilst having cPanel's file manager zip the access-logs symlink and I saw that it runs the same:
What could be the problem zipping the access-logs via SSH? Is it possible? Am I doing something wrong? Thank you :)
lrwxrwxrwx 1 user user 34 Aug 6 03:00 access-logs -> /usr/local/apache/domlogs/userneeds to be zipped. Zip is installed on the server but I am unable to zip the access-logs symlink. I have so far tried:
zip -r /home/homeqpig/access-logs-ftw.zip access-logswhich returns:
zip warning: name not matched: access-logsI have also tried using the --symlink option of zip but to no avail. Now I did run a "top -c" whilst having cPanel's file manager zip the access-logs symlink and I saw that it runs the same:
43097 user 39 19 99.1m 1228 800 R 7.1 0.0 0:00.07 zip -r /home/user/access-logs.zip access-logsWhat could be the problem zipping the access-logs via SSH? Is it possible? Am I doing something wrong? Thank you :)
-
Hello, Are you logged in via SSH as "root" or as the account username? Also, ensure you use the full path to "access-logs" in-case you aren't in the correct directory. EX: zip /home/$username/access-logs-test.zip /home/$username/access-logs
Thank you.0 -
I do not have root privileges - just a jailshell for the account username. It appears, though, that the symlink is in a chroot jail. And yes, I have tried full paths all the way long as well as using 7zip, tar and others. 0 -
Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome. Thank you. 0 -
I was about to open a ticket in the beginning, however I am required to provide a support access ID which I do not have. 0 -
Hi @Keeperax, I've found this is actually related to an internal case, EA-4835, where /etc/apache2 isn't mounted for jailshell users. This leads to the issue you described where zipping the access-log file under /home/$user/ fails because it's not accessible. I'll update this thread once the resolution is published. In the meantime, you can add the following custom mount point in /var/cpanel/jailshell-additional-mounts using the instructions at How to Create Custom Jailed Shell (Jailshell) Mounts - cPanel Knowledge Base - cPanel Documentation : /etc/apache2/logs/domlogs
Ensure you remove this entry after the resolution is published. Thank you.0
Please sign in to leave a comment.
Comments
5 comments