On Sat, Nov 05, 2005 at 08:06:18PM +0100, Kjetil Kjernsmo wrote:
> Hi all!
Hi,
> There is just one thing that's painful about Subversion, but that's
> rather painful too: permissions...
>
> I have often thought I have got it right, but there is one thing that
> remains: There seems to be some rotating of the log.* files, and if
> that rotation is prompted by me using ssh, everything is fine. But if
> it is prompted by the web server, it seems like the new file is not
> created with 664 like it must be, but with 644, which will cause
> problems later, requiring manual intervention and database recovery.
>
> The Book, http://svnbook.red-bean.com/en/1.0/ch06s05.html
> suggests modifying the apachectl script, but I'm guessing that's not the
> Debian Way. I need to tell Apache2 to use umask 002 when rotating these
> logs somehow, but I'm out of ideas... Any?
>
> Cheers,
>
> Kjetil
> --
> Kjetil Kjernsmo
> Programmer / Astrophysicist / Ski-orienteer / Orienteer / Mountaineer
> kjetil@kjernsmo.net
> Homepage: http://www.kjetil.kjernsmo.net/ OpenPGP KeyID: 6A6A0BBC
Check your /etc/logrotate.d/apache2 (or /etc/logrotate.conf).
You should have something like:
/var/log/apache2/*.log {
weekly
missingok
rotate 52
compress
delaycompress
notifempty
create 640 root adm <---------------- change the mode 664
sharedscripts
postrotate
if [ -f /var/run/apache2.pid ]; then
/etc/init.d/apache2 restart > /dev/null
fi
endscript
}
See man logrotate for more details about the syntax in the conf files.
Simo
--
:r ~/.signature
Attachment:
signature.asc
Description: Digital signature