Webalizer

Place to discuss anything, almost. No politics, religion, Microsoft, or anything else that I (the nazi censor) deem inappropriate.
dickinsd
scripter
scripter
Posts: 84
Joined: Sun Jan 30, 2005 2:29 pm
Location: Bristol, UK

Post by dickinsd » Tue Mar 22, 2005 3:25 am

Hello.

Ok, I copied your script to a file called runwebalizer in the folder /home/me/webalizer

But i can't run the next part, as apparently there is no crontab for me:
[me@Eval01 ~]$ crontab -l | grep webalizer
no crontab for me
I meant to ask you about that the other day, for now I have been having to just get root access to manually run webalizer when ever I want to update the stats.

If I try to run webalizer as a normal user I get this error:
[me@Eval01 ~]$ webalizer
Error: Can't open log file /var/log/httpd/access_log
When I try your ls command I get this:
[me@Eval01 ~]$ ls -ld /var/www/html/usage
drwxrwxr-x 2 webalizer root 4096 Mar 18 22:58 /var/www/html/usage
PS: I might have caused my self more problems as I have been going round changing file owners and file groups and can't remember what they where before I started trying to 'fix' the problem :cry:

As for errors in my log file; These look to me like its some file permissions I have messed up somewhere:
[Tue Mar 22 09:21:45 2005] [error] [client 192.168.1.3] client denied by server configuration: /var/www/usage, referer: http://192.168.1.4/
I was trying to run the stats from another machine on the network.

So, I guess it comes down to this: "What did I do wrong?" :oops:

Thanks

Dave

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Tue Mar 22, 2005 9:12 am

dickinsd wrote:Hello.

Ok, I copied your script to a file called runwebalizer in the folder /home/me/webalizer

But i can't run the next part, as apparently there is no crontab for me:
[me@Eval01 ~]$ crontab -l | grep webalizer
no crontab for me
I meant to ask you about that the other day, for now I have been having to just get root access to manually run webalizer when ever I want to update the stats.
There won't be a crontab until you have an entry in it. That just means you don't have any jobs scheduled. To add a cron job just run "crontab -e".
If I try to run webalizer as a normal user I get this error:
[me@Eval01 ~]$ webalizer
Error: Can't open log file /var/log/httpd/access_log
Assuming you don't care if other users on your system can read your Apache logs:

# chmod a+rx /var/log/httpd

Otherwise set permissions as restrictive as you need on the logs but make sure the user you run webalizer under has permission to read them.
When I try your ls command I get this:
[me@Eval01 ~]$ ls -ld /var/www/html/usage
drwxrwxr-x 2 webalizer root 4096 Mar 18 22:58 /var/www/html/usage
PS: I might have caused my self more problems as I have been going round changing file owners and file groups and can't remember what they where before I started trying to 'fix' the problem :cry:
The permissions are right *if* you run your webalizer program under the user "webalizer". Also make sure the files in that directory are owned by that user.
As for errors in my log file; These look to me like its some file permissions I have messed up somewhere:
[Tue Mar 22 09:21:45 2005] [error] [client 192.168.1.3] client denied by server configuration: /var/www/usage, referer: http://192.168.1.4/
I was trying to run the stats from another machine on the network.
This one is confusing. The error message in your log refers to /var/www/usage and your webalizer directory is actually /var/www/html/usage. The default web root should be "/var/www/html" and it would almost appear that yours is set to "/var/www". Did you happen to change anything in your httpd.conf recently?

kovax
scripter
scripter
Posts: 85
Joined: Mon Jan 24, 2005 9:47 am
Location: Jacksonville, USA
Contact:

Awstats

Post by kovax » Mon Apr 11, 2005 6:50 am

Awstats rules as a log file analyzer. That is your best bet. There is an RPM out there that i ran and I cant be hapier.

ZiaTioN
administrator
administrator
Posts: 460
Joined: Tue Apr 08, 2003 3:28 pm
Contact:

Post by ZiaTioN » Mon Apr 11, 2005 11:38 am

Make sure you have your AWSTATS patched or upgrade to the latest release. There is a security hole in old releases that give malicious users a gaping hole to walk right through. This exploit was used to take down high profile sights such as the phpBB support site about a month ago.

Post Reply