Page 2 of 2

PostPosted: Tue Mar 22, 2005 3:25 am
by dickinsd
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

PostPosted: Tue Mar 22, 2005 9:12 am
by Void Main
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?

Awstats

PostPosted: Mon Apr 11, 2005 6:50 am
by kovax
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.

PostPosted: Mon Apr 11, 2005 11:38 am
by ZiaTioN
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.