[plug] Logrotate Killing Apache

Bernard Blackham bernard at blackham.com.au
Sun Oct 23 15:07:04 WST 2005


On Sun, Oct 23, 2005 at 12:58:19PM +0800, Timothy White wrote:
> If I find out what is accessing the logs files... It appears that pppd is!?!?!
> $ sudo lsof +D /var/log/apache2/
> COMMAND   PID USER   FD   TYPE DEVICE    SIZE  NODE NAME
> pppd    20576 root    6w   REG  254,2     187 16386 /var/log/apache2/error.log
> pppd    20576 root    7w   REG  254,2 1719857 16661 /var/log/apache2/access.log
> 
> Anyone know why it does, and how to stop it?

Are you using some web script to start pppd?

> apache runs the modem control application

I guess so :)

Presumably pppd is inheriting the FDs from apache. Perhaps make a
wrapper script with something like:

   #!/bin/sh
   exec 3>&- 4>&- 5>&- 6>&- 7>&- 8>&- 9>&- 10>&-
   exec /usr/sbin/pppd "$@"

Though I'm not convinced that this is what's making logrotate
unhappy, but try it and see :)

Bernard.

-- 
 Bernard Blackham <bernard at blackham dot com dot au>



More information about the plug mailing list