Portal Home > Knowledgebase > Articles Database > how view error log of server?


how view error log of server?




Posted by Ba$im, 08-24-2007, 07:24 AM
hello I try view error log of server with this command /usr/local/cpanel/logs/access_log /usr/local/cpanel/logs/* /usr/local/cpanel/logs/access_log /usr/local/apache/logs/error_log but it tell me permission denied so how I view it? can I view it with WHM or CP? thanks in advance

Posted by david510, 08-24-2007, 08:02 AM
Do you have root access to the server? Or you are logging into the ssh as user? Only root users can view these log files.

Posted by jshpik1, 08-24-2007, 09:17 AM
I'm assuming your control panel has a thing where you can download the logs. The control panel I use updates the logs every 24 hrs.

Posted by Patrick, 08-24-2007, 10:30 AM
It looks like you're just entering the path to the logs with no preceding command. Try the following: cat /usr/local/cpanel/logs/access_log | more tail -f /usr/local/cpanel/logs/access_log If you have more specific questions relating to tail or cat, just ask here and someone will help you.

Posted by Patrick, 08-24-2007, 10:33 AM
You are correct, but even as root if no preceding command is given a permission denied error will be returned. Example: server02-01# whoami root server02-01# /usr/local/apache/logs/access_log /usr/local/apache/logs/access_log: Permission denied.

Posted by xserverx, 08-24-2007, 11:29 AM
I think you can view the necessary log on your cp like /log on your FTP

Posted by luki, 08-24-2007, 12:12 PM
That's because you are trying to execute the log file, which without the +x bit isn't allowed (why would you want to anyway). Run it through less, grep, cat, etc.

Posted by Ba$im, 08-24-2007, 02:28 PM
Iam log to server as root guys and still have permission denied message

Posted by kgs_namboothiri, 08-24-2007, 02:31 PM
You can look in the log files.the location /var/log/ /var/log/messages will display the logs.But it will no get all messages.You can use directries under /var/log as per you requirements. kgs_namboothiri@yahoo.co.in

Posted by AventureRichard, 08-24-2007, 02:38 PM
View Complete File pico -w /usr/local/apache/logs/access_log or nano -w /usr/local/apache/logs/access_log Tail logs (live updates show on screen) tail -f /usr/local/apache/logs/access_log View last 100 lines tail -100 /usr/local/apache/logs/access_log Find only listings with particular words on screen with 'More' option. grep CONTENT /usr/local/apache/logs/access_log | more Hope that helps.

Posted by david510, 08-25-2007, 01:57 AM
Have you tried the way Pat has mentioned? If vi, pico is not working then those binaries are corrupted. You will need to re-install them.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
MySQL memory problem (Views: 569)
SSL Certificate (Views: 591)