LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-29-2005, 09:42 AM   #1
jfchap
LQ Newbie
 
Registered: Dec 2005
Posts: 3

Rep: Reputation: 0
Apache + cronolog under Fedora


Hi,

i had install apache webserver under Fedora. I set a server with 4 virtual hosts. And now i want to install AWStats to analyze my logs files. But i need to split the log files for each day. So i use cronolog to split de files.

When I start the http daemon by myself (under root user) i'm able to see the log files. But when i use tghe service command i got an error "Permission Denied". I try to find if a special user is need to start the services, or if there any special access required to write the log files.

I was also able with the service command to write in /tmp . But i would like to store my logfiles in /vat/log/httpd

I checked also the proccess for each task... Apache use apache user but cronolog seem to be root user.

I do somes tests while i write this message... Is it possible that's it's unable to cronolog to create logs but to append a to file?

So if some people got this problem and fix it let me know!

Thanks
 
Old 12-30-2005, 04:30 AM   #2
jimvin
Member
 
Registered: May 2004
Posts: 71

Rep: Reputation: 15
Hi,
Make sure that the user running Apache (apache, httpd, nobody) is able to write to the log directory /var/log/httpd. If you are using cronolog v1.7.0beta or v1.6.2 with the jumbo patch added you can specify the use that will own the cronolog process and the log files.

Code:
CustomLog "|/usr/bin/cronolog -u <logowner> -p '12 hours' /var/logs/https/access%Y%m%d%H" combined
Regards,
Jimvin
 
Old 01-05-2006, 11:25 PM   #3
jfchap
LQ Newbie
 
Registered: Dec 2005
Posts: 3

Original Poster
Rep: Reputation: 0
I try with the beta version and I still got the same problem. Here the entries in my httpd.conf file :

Quote:
ErrorLog "|/usr/local/sbin/cronolog -u apache -g apache -S /var/log/httpd/laronde-error_log -x /tmp/debug /var/log/httpd/%Y/laronde%m%d-error_log"

CustomLog "|/usr/local/sbin/cronolog -u apache -g apache -S /var/log/httpd/laronde-access_log -x /tmp/debug /var/log/httpd/%Y/laronde%m%d-access_log" combined
 
Old 01-06-2006, 04:18 AM   #4
jimvin
Member
 
Registered: May 2004
Posts: 71

Rep: Reputation: 15
Check the ownership of the log directory; can 'apache' write to this dir?

ls -ld /var/log/httpd

Regards,
Jimvin
 
Old 01-06-2006, 10:24 AM   #5
jfchap
LQ Newbie
 
Registered: Dec 2005
Posts: 3

Original Poster
Rep: Reputation: 0
The user apache already have right to this folder.

I'm able to append lines to the log file but unable to create new log files.

Here the result for the folder :
drwxrwxr-x 3 apache apache 4096 Jan 1 11:25 /var/log/httpd

And the error_log file from apache :
piped log program '/usr/local/sbin/cronolog -u apache -g apache -S /var/log/httpd/laronde-access_log -x /tmp/debug /var/log/httpd/%Y/laronde%m%d-access_log' failed unexpectedly
/var/log/httpd/2006: Permission denied
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling Apache when I already have Apache that came with Fedora bwoodruff Fedora 6 08-21-2005 03:00 PM
Fedora 3 and Apache webwolf70 Fedora 2 05-05-2005 11:51 PM
cronolog issues mgm36 Linux - Software 2 04-29-2005 11:06 AM
cronolog tinaa Linux - General 3 06-29-2003 04:00 AM
problems with cronolog current / previous cliffyman Linux - Software 0 05-16-2003 10:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration