On Sat, Oct 21, 2006 at 02:50:57PM +0200, LeVA wrote:
> Hi!
> 
> I know this is a rather simple problem, but I would like to hear the 
> advices.
> 
> I'm using a piped Custom- and ErrorLog in apache, it pipes the output to 
> cronolog (the log files are rotated per 24hour). The log files are 
> created with 644 permissions, and this is what I try to avoid, and 
> force the new logfile to have 640 permissions.
> So far I thought of a cron line which would be `chmod -R 
> o= /var/www/logs/`.
> Then the umask command came to my mind, but then I would have to make a 
> script, which contains the umask line, and after that call cronolog, 
> and pipe the logs to this script.
> Would someone please hint me with a more simple and elegant solution?
> 
> Thanks!
> 
> Daniel

The last solution works fine:

#!/bin/sh

umask 027
exec /usr/.../cronolog

The alternative would be chmod'ing the log directory to 0750, or
somesuch.

                Joachim

Reply via email to