HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   Error starting Lighttpd (http://www.howtoforge.com/forums/showthread.php?t=41246)

jadude 22nd November 2009 15:35

Error starting Lighttpd
 
Hello there i am running a webserver on ubuntu 8.04

My problem is since recently without changing anything to the server it keeps dropping permission for lighttpd log directory

so i have to run a command each time to chown the directory before i can get lighttpd running


Error Below

opening errorlog '/var/log/lighttpd/error.log' failed: Permission denied
Opening errorlog failed. Going down.

I have to run chown -R www-data:www-data /var/log/lighttpd before restarting the server, does anyone knows how to fix this please.

Thank you. I used the tutorials found on this site to Install my webserver
You guys ROCK

Thanks in advance

falko 23rd November 2009 14:14

Who owns the directory before you run the chown command?

jadude 23rd November 2009 16:55

www-data owns the directory which is the user for lighttpd

falko 24th November 2009 14:52

Can you post the output of
Code:

ls -la /var/log/lighttpd/
when the ownerships are wrong?

jadude 25th November 2009 05:26

This is the output of the directory
Quote:

drwxrwx--- 2 www-data www-data 4096 Nov 23 07:49 .
drwxr-xr-x 17 root root 4096 Nov 24 07:57 ..
-rw-r----- 1 syslog adm 0 Nov 23 07:49 access.log
-rw-r----- 1 www-data www-data 2852083359 Nov 24 23:24 access.log.0
-rw-r----- 1 www-data www-data 107637272 Nov 21 18:20 access.log.1.gz
-rw-rw-r-- 1 www-data www-data 156535547 Oct 11 07:41 access.log.10.gz
-rw-rw-r-- 1 www-data www-data 164437510 Sep 13 06:47 access.log.11.gz
-rw-rw-r-- 1 www-data www-data 166732299 Aug 30 06:42 access.log.12.gz
-rw-rw---- 1 www-data www-data 36452819 Nov 22 07:53 access.log.2.gz
-rw-rw---- 1 www-data www-data 90378101 Nov 20 11:58 access.log.3.gz
-rw-rw---- 1 www-data www-data 352172419 Nov 18 21:02 access.log.4.gz
-rw-rw---- 1 www-data www-data 29706364 Nov 19 07:59 access.log.5.gz
-rw-rw---- 1 www-data www-data 202849893 Nov 12 13:41 access.log.6.gz
-rw-rw---- 1 www-data www-data 4321550 Nov 8 07:36 access.log.7.gz
-rw-rw---- 1 www-data www-data 15974329 Oct 23 07:50 access.log.8.gz
-rw-rw---- 1 www-data www-data 20914963 Oct 18 07:49 access.log.9.gz
-rw-rw---- 1 syslog adm 178253 Nov 24 23:13 error.log
-rw-rw---- 1 www-data www-data 194893 Nov 21 18:20 error.log.0
-rw-rw---- 1 www-data www-data 2986 Nov 22 06:56 error.log.1.gz
-rw-rw-r-- 1 www-data www-data 15210 Sep 13 06:40 error.log.10.gz
-rw-rw-r-- 1 www-data www-data 14854 Sep 6 06:50 error.log.11.gz
-rw-rw-r-- 1 www-data www-data 18905 Aug 30 06:40 error.log.12.gz
-rw-rw---- 1 www-data www-data 68352 Nov 18 21:02 error.log.2.gz
-rw-rw---- 1 www-data www-data 2847 Nov 19 07:55 error.log.3.gz
-rw-rw---- 1 www-data www-data 20883 Nov 7 23:30 error.log.4.gz
-rw-rw---- 1 www-data www-data 31851 Oct 24 07:50 error.log.5.gz
-rw-rw---- 1 www-data www-data 9662 Oct 25 07:50 error.log.6.gz
-rw-rw---- 1 www-data www-data 13725 Oct 17 07:50 error.log.7.gz
-rw-rw-r-- 1 www-data www-data 14472 Sep 20 07:35 error.log.9.gz

damir 25th November 2009 08:58

Run:

chown www-data:www-data /var/log/lighttpd/error.log

and restart you lighttpd service.

jadude 25th November 2009 14:13

ok thanks, hopefully it shouldnt lose permissions now

jadude 25th November 2009 19:16

After a Few hours its back. syslog has taken permission of error.log once more

Quote:

drwxrwx--- 2 www-data www-data 4096 Nov 23 07:49 .
drwxr-xr-x 17 root root 4096 Nov 25 07:42 ..
-rw-r----- 1 syslog adm 235850578 Nov 25 13:13 access.log
-rw-r----- 1 www-data www-data 3069827650 Nov 25 08:10 access.log.0
-rw-r----- 1 www-data www-data 107637272 Nov 21 18:20 access.log.1.gz
-rw-rw-r-- 1 www-data www-data 156535547 Oct 11 07:41 access.log.10.gz
-rw-rw-r-- 1 www-data www-data 164437510 Sep 13 06:47 access.log.11.gz
-rw-rw-r-- 1 www-data www-data 166732299 Aug 30 06:42 access.log.12.gz
-rw-rw---- 1 www-data www-data 36452819 Nov 22 07:53 access.log.2.gz
-rw-rw---- 1 www-data www-data 90378101 Nov 20 11:58 access.log.3.gz
-rw-rw---- 1 www-data www-data 352172419 Nov 18 21:02 access.log.4.gz
-rw-rw---- 1 www-data www-data 29706364 Nov 19 07:59 access.log.5.gz
-rw-rw---- 1 www-data www-data 202849893 Nov 12 13:41 access.log.6.gz
-rw-rw---- 1 www-data www-data 4321550 Nov 8 07:36 access.log.7.gz
-rw-rw---- 1 www-data www-data 15974329 Oct 23 07:50 access.log.8.gz
-rw-rw---- 1 www-data www-data 20914963 Oct 18 07:49 access.log.9.gz
-rw-rw---- 1 syslog adm 202837 Nov 25 13:01 error.log
-rw-rw---- 1 www-data www-data 194893 Nov 21 18:20 error.log.0
-rw-rw---- 1 www-data www-data 2986 Nov 22 06:56 error.log.1.gz
-rw-rw-r-- 1 www-data www-data 15210 Sep 13 06:40 error.log.10.gz
-rw-rw-r-- 1 www-data www-data 14854 Sep 6 06:50 error.log.11.gz
-rw-rw-r-- 1 www-data www-data 18905 Aug 30 06:40 error.log.12.gz
-rw-rw---- 1 www-data www-data 68352 Nov 18 21:02 error.log.2.gz
-rw-rw---- 1 www-data www-data 2847 Nov 19 07:55 error.log.3.gz
-rw-rw---- 1 www-data www-data 20883 Nov 7 23:30 error.log.4.gz
-rw-rw---- 1 www-data www-data 31851 Oct 24 07:50 error.log.5.gz
-rw-rw---- 1 www-data www-data 9662 Oct 25 07:50 error.log.6.gz
-rw-rw---- 1 www-data www-data 13725 Oct 17 07:50 error.log.7.gz
-rw-rw-r-- 1 www-data www-data 14472 Sep 20 07:35 error.log.9.gz

falko 26th November 2009 17:01

I think you should check your syslogd configuration.

jadude 13th December 2009 15:11

Quote:

*.none /var/log/lighttpd/error.log
*.none /var/log/lighttpd/access.log
These are the only reference i see of lighttpd in syslog.conf

i commented them out and will be testing to see if this works


All times are GMT +2. The time now is 06:49.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.