From: Jamie C. <jca...@we...> - 2004-01-12 21:51:36
|
On Mon, 2004-01-12 at 19:01, Martin Mewes wrote: > Hi all, > > please let me do some suggestions about the new module logrotate which > comes with the latest Devel-Package of Webmin. > > While translating this module into german I ran across a problem which > may comes up, if certain logfiles are written and older ones are > stored in User-Homedirectories. > > On my server I use the following template in Virtualmin for Apache > > ServerName ${DOM} > ServerAlias www.${DOM} > DocumentRoot ${HOME}/public_html > ErrorLog ${HOME}/logs/www.$DOM.error.log > CustomLog ${HOME}/logs/www.$DOM.log combined > ScriptAlias /cgi-bin ${HOME}/cgi-bin > <Directory ${HOME}> > AllowOverride All > </Directory> > HostNameLookups on > ErrorDocument 404 http://www.$DOM/ > > So the current CustomLog and ErrorLog are owned by the user, but > rotated logs are owned by root. This does not do any harm to Webalizer > for my users because Webalizer works as root to get things done, but > sometimes users want to delete files in their directories (even if > deleting may would be stupid, but I can almost hear them say "These > are my files and I want to delete them if I want!"). > > I see it can be set with > > Standard (Yes, with old permissions) > > but what if a gone wild admin wants to get things back, because he > messed up his configuration ;-) > > I would suggest the following option to logrotate if possible: > > ###################################################################### > > Global Options > [...] > Re-create log file after rotation? > [...] > [x] With rights taken from the folder the logs are written > and stored in. Use this option if you want to be sure > that all User-Logs can be fully accessed by your > users. Be sure that your users have full access > to their logfile-folders. > [...] > > ###################################################################### > > After a complete rotation of (in my case) four weeks, admin can be > sure that all of his myriad logfiles ;-) are back to normal. That would be a cool feature .. but unfortunately, logrotate (the program the module configures) does not have a directive to do this as far as a I know. All it can be is re-create a log as a specific user, or as the user the log was originally owned by .. - Jamie |