Re: [gentoo-user] Logrotate ignores standard log files

2020-08-05 Thread Michael
On Monday, 3 August 2020 07:58:03 BST Bertram Scharpf wrote:
> Hi,
> 
> I detected that since mid-May my main log files
> /var/log/{messages,auth.log,daemon.log,...}
> don't get rotated any more.
> 
> I tried to solve this by making an entry in
> /etc/logrotate.conf, but that doesn't work.
> "maxsize" works, but not "weekly" nor "daily".
> 
> What happened in May and what do I have to try?
> 
> Thanks in advance.
> 
> Bertram

Is the default cron job there, or did you remove it?

$ ls -la /etc/cron.daily/logrotate 
-rwxr-xr-x 1 root root 188 Jun 13  2019 /etc/cron.daily/logrotate

$ cat /etc/cron.daily/logrotate 
#!/bin/sh

/usr/bin/logrotate /etc/logrotate.conf
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
/usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
fi
exit $EXITVALUE



signature.asc
Description: This is a digitally signed message part.


[gentoo-user] Logrotate ignores standard log files

2020-08-03 Thread Bertram Scharpf
Hi,

I detected that since mid-May my main log files
/var/log/{messages,auth.log,daemon.log,...}
don't get rotated any more.

I tried to solve this by making an entry in
/etc/logrotate.conf, but that doesn't work.
"maxsize" works, but not "weekly" nor "daily".

What happened in May and what do I have to try?

Thanks in advance.

Bertram


-- 
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de



Re: [gentoo-user] logrotate ... won't!

2017-02-13 Thread Neil Bothwick
On Sun, 12 Feb 2017 21:26:51 -0600, Dale wrote:

> >> Thanks Alexander, it pays going back to basics ... for some reason my
> >> cronie service was not running.  o_O
> >>
> >> I added it to default runlevel and hopefully it will do its magic
> >> from now on.  
> > I'm glad I'm not the only one prone to this kind of thing. :(
> >  
> 
> You're not.  ;-)


You're part of a large group of people that make such mistakes and a much
smaller group of those that admit to them ;-)


-- 
Neil Bothwick

One-seventh of life is spent on Monday.


pgpYV2FrAIoHU.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] logrotate ... won't!

2017-02-12 Thread Dale
Peter Humphrey wrote:
> On Sunday 12 Feb 2017 17:32:30 Mick wrote:
>
>> Thanks Alexander, it pays going back to basics ... for some reason my
>> cronie service was not running.  o_O
>>
>> I added it to default runlevel and hopefully it will do its magic from now
>> on.
> I'm glad I'm not the only one prone to this kind of thing. :(
>


You're not.  ;-)

Dale

:-)  :-) 



Re: [gentoo-user] logrotate ... won't!

2017-02-12 Thread Peter Humphrey
On Sunday 12 Feb 2017 17:32:30 Mick wrote:

> Thanks Alexander, it pays going back to basics ... for some reason my
> cronie service was not running.  o_O
> 
> I added it to default runlevel and hopefully it will do its magic from now
> on.

I'm glad I'm not the only one prone to this kind of thing. :(

-- 
Regards
Peter




Re: [gentoo-user] logrotate ... won't!

2017-02-12 Thread Mick
On Sunday 12 Feb 2017 19:11:23 Alexander Kapshuk wrote:
> On Sun, Feb 12, 2017 at 6:57 PM, Mick  wrote:
> > I am perplexed why box of mine will not logrotate system logs, which have
> > now grown into gigs.  kern.log, syslog, messages, etc. are eating up
> > space unconstrained, to the point where the partition run out of it.
> > 
> > Trying to run /etc/cron.daily/logrotate from a terminal does not show
> > anything in messages, or syslog.
> > 
> > Particulars below:
> > 
> > # ls -la /etc/cron.daily/logrotate
> > -rwxr-xr-x 1 root root 179 Feb 12 16:09 /etc/cron.daily/logrotate
> > 
> > 
> > # cat /etc/cron.daily/logrotate
> > #!/bin/sh
> > 
> > /usr/bin/logrotate /etc/logrotate.conf
> > EXITVALUE=$?
> > if [ $EXITVALUE != 0 ]; then
> > 
> > /usr/bin/logger -t logrotate "ALERT exited abnormally with
> > [$EXITVALUE]"
> > 
> > fi
> > exit 0
> > 
> > 
> > This is an installation I have not really changed much from default
> > settings. Comparing with other systems which work as expected I can't see
> > anything amiss. How could I troubleshoot/fix this problem?
> > 
> > --
> > Regards,
> > Mick
> 
> I had a similar problem a while back, and Alex Corkwell suggested
> removing the executable bit on /etc/cron.hourly/0anacron, which did
> the trick for me.
> 
> See gentoo-user archives for an email exchange with 'portage summary
> logs not rotated any more' as the subject for full details.
> 
> Hope this helps.

Thanks Alexander, it pays going back to basics ... for some reason my cronie 
service was not running.  o_O

I added it to default runlevel and hopefully it will do its magic from now on.
-- 
Regards,
Mick

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] logrotate ... won't!

2017-02-12 Thread Alexander Kapshuk
On Sun, Feb 12, 2017 at 6:57 PM, Mick  wrote:
> I am perplexed why box of mine will not logrotate system logs, which have now
> grown into gigs.  kern.log, syslog, messages, etc. are eating up space
> unconstrained, to the point where the partition run out of it.
>
> Trying to run /etc/cron.daily/logrotate from a terminal does not show anything
> in messages, or syslog.
>
> Particulars below:
>
> # ls -la /etc/cron.daily/logrotate
> -rwxr-xr-x 1 root root 179 Feb 12 16:09 /etc/cron.daily/logrotate
>
>
> # cat /etc/cron.daily/logrotate
> #!/bin/sh
>
> /usr/bin/logrotate /etc/logrotate.conf
> EXITVALUE=$?
> if [ $EXITVALUE != 0 ]; then
> /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
> fi
> exit 0
>
>
> This is an installation I have not really changed much from default settings.
> Comparing with other systems which work as expected I can't see anything
> amiss. How could I troubleshoot/fix this problem?
>
> --
> Regards,
> Mick

I had a similar problem a while back, and Alex Corkwell suggested
removing the executable bit on /etc/cron.hourly/0anacron, which did
the trick for me.

See gentoo-user archives for an email exchange with 'portage summary
logs not rotated any more' as the subject for full details.

Hope this helps.



[gentoo-user] logrotate ... won't!

2017-02-12 Thread Mick
I am perplexed why box of mine will not logrotate system logs, which have now 
grown into gigs.  kern.log, syslog, messages, etc. are eating up space 
unconstrained, to the point where the partition run out of it.

Trying to run /etc/cron.daily/logrotate from a terminal does not show anything 
in messages, or syslog.

Particulars below:

# ls -la /etc/cron.daily/logrotate
-rwxr-xr-x 1 root root 179 Feb 12 16:09 /etc/cron.daily/logrotate


# cat /etc/cron.daily/logrotate
#!/bin/sh

/usr/bin/logrotate /etc/logrotate.conf
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
/usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
fi
exit 0


This is an installation I have not really changed much from default settings.  
Comparing with other systems which work as expected I can't see anything 
amiss. How could I troubleshoot/fix this problem?

-- 
Regards,
Mick

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] logrotate: name of log file after it's rotated?

2016-04-02 Thread Neil Bothwick
On Sat, 2 Apr 2016 08:51:30 +0200, Alan McKinnon wrote:

> > Exactly, and that's why there needs to be some sort of place holder
> > for the file name.

> I don't think it's a case of "there needs to be".
> I think it's more a case of "you want it to be to solve this special
> problem you have", and perhaps the logrotate maintainer doesn't agree.

Or perhaps the maintainer hasn't even considered the idea and all it needs
is a feature request.


-- 
Neil Bothwick

0 and 1. Now what could be so hard about that?


pgpmBNXqpxDdz.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] logrotate: name of log file after it's rotated?

2016-04-02 Thread Alan McKinnon
On 02/04/2016 04:01, lee wrote:
>> It depends. There are options to tell logrotate to use, or not use,
>> > dates in the new filename, and what compression to use or not use. So
>> > the names can vary.
> Exactly, and that's why there needs to be some sort of place holder for
> the file name.
> 


I don't think it's a case of "there needs to be".
I think it's more a case of "you want it to be to solve this special
problem you have", and perhaps the logrotate maintainer doesn't agree.


-- 
Alan McKinnon
alan.mckin...@gmail.com




Re: [gentoo-user] logrotate: name of log file after it's rotated?

2016-04-01 Thread lee
Alan McKinnon  writes:

> On 25/03/2016 13:46, lee wrote:
>> 
>> Hi,
>> 
>> is there a built-in way (like a place holder) to figure out what name a
>> rotated log file has been given by logrotate?
>> 
>> Here's what I'm trying to do:
>> 
>> 
>> , [ cat /etc/logrotate.d/exim }
>> | /var/log/exim/exim*.log {
>> | daily
>> | missingok
>> | rotate 800
>> | compress
>> | delaycompress
>> | notifempty
>> | create 640 mail mail
>> | postrotate
>> | /usr/sbin/eximstats  | mail -s 
>> "eximstats" root
>> | endscript
>> | }
>> `
>> 
>> 
>> I want  replaced with the name the log file that
>> has been rotated has been renamed to.  I can think of ways to do this
>> otherwise, like writing a script that figures out the name of the file,
>> or using 'prerotate' instead.
>> 
>> It just won't make any sense if logrotate doesn't already have some kind
>> of place holder for this.
>> 
>
>
> It depends. There are options to tell logrotate to use, or not use,
> dates in the new filename, and what compression to use or not use. So
> the names can vary.

Exactly, and that's why there needs to be some sort of place holder for
the file name.

> By far the easiest solution is to put your "| mail" into prerotate
> section. That way you know exactly what the name is. Or maybe not due to
> that * in the name glob...

The problem is that the file can be written to while it is being
examined when the examination is performed before it is rotated.  That
can lead to false results of the examination.

> Perhaps look into renamecopy described in man logrotate

Thanks, that sounds as if it will provide exactly what I'm looking for
:)



Re: [gentoo-user] logrotate: name of log file after it's rotated?

2016-03-25 Thread Alan McKinnon
On 25/03/2016 13:46, lee wrote:
> 
> Hi,
> 
> is there a built-in way (like a place holder) to figure out what name a
> rotated log file has been given by logrotate?
> 
> Here's what I'm trying to do:
> 
> 
> , [ cat /etc/logrotate.d/exim }
> | /var/log/exim/exim*.log {
> | daily
> | missingok
> | rotate 800
> | compress
> | delaycompress
> | notifempty
> | create 640 mail mail
> | postrotate
> | /usr/sbin/eximstats  | mail -s 
> "eximstats" root
> | endscript
> | }
> `
> 
> 
> I want  replaced with the name the log file that
> has been rotated has been renamed to.  I can think of ways to do this
> otherwise, like writing a script that figures out the name of the file,
> or using 'prerotate' instead.
> 
> It just won't make any sense if logrotate doesn't already have some kind
> of place holder for this.
> 


It depends. There are options to tell logrotate to use, or not use,
dates in the new filename, and what compression to use or not use. So
the names can vary.

By far the easiest solution is to put your "| mail" into prerotate
section. That way you know exactly what the name is. Or maybe not due to
that * in the name glob...

Perhaps look into renamecopy described in man logrotate

-- 
Alan McKinnon
alan.mckin...@gmail.com




[gentoo-user] logrotate: name of log file after it's rotated?

2016-03-25 Thread lee

Hi,

is there a built-in way (like a place holder) to figure out what name a
rotated log file has been given by logrotate?

Here's what I'm trying to do:


, [ cat /etc/logrotate.d/exim }
| /var/log/exim/exim*.log {
| daily
| missingok
| rotate 800
| compress
| delaycompress
| notifempty
| create 640 mail mail
| postrotate
| /usr/sbin/eximstats  | mail -s 
"eximstats" root
| endscript
| }
`


I want  replaced with the name the log file that
has been rotated has been renamed to.  I can think of ways to do this
otherwise, like writing a script that figures out the name of the file,
or using 'prerotate' instead.

It just won't make any sense if logrotate doesn't already have some kind
of place holder for this.



Re: [gentoo-user] logrotate: /var/log/portage/elog insecure permissions?

2011-08-29 Thread Florian Philipp
Am 28.08.2011 20:44, schrieb Florian Philipp:
 Am 28.08.2011 13:14, schrieb Mick:
 On Sunday 07 Aug 2011 16:20:18 Florian Philipp wrote:
 Am 07.08.2011 02:22, schrieb Mick:
 On Friday 05 Aug 2011 23:08:38 Neil Bothwick wrote:
 On Fri, 05 Aug 2011 17:59:00 +0200, Florian Philipp wrote:
 Yes, this was introduced in 3.8.0 to fix security issues [1]. Change
 your config to look like this:
 /var/log/portage/elog/summary.log {
 su portage portage
 ...
 }

 Disclaimer: I've not really tried this (yet) but I think I'm able to
 read changelogs and man-pages. ;-)

 Yes that fixes it. The latest portage ebuilds include an updated config
 file.

 Hmm ... it still complains here!

 error: error setting owner of
 /var/log/portage/elog/summary.log-20110801.gz: Operation not permitted


 This is my /etc/logrotate.d/elog-save-summary:
 ===
 /var/log/portage/elog/summary.log {

  su portage portage
  
 missingok
 nocreate
 delaycompress

 }
 ===

 # ls -la /var/log/portage/elog/summary.log
 -rw-rw-r-- 1 root portage 4326 Aug  6 09:44
 /var/log/portage/elog/summary.log

 Can you see anything amiss?

 At least on my system, /var/log/portage has the following permissions:
 drwxr-xr-x root root

 Only root can write, therefore the config must read

 /var/log/portage/elog/summary.log {
  su root portage
  missingok
  nocreate
  delaycompress
 }

 The latest logrotate update wanted to change the above line from su root 
 portage to su portage portage ...

 Should I be changing the ownership of /var/log/portage and /var/log/portage 
 elog?
 
 Unless portage now drops privileges from root:portage to portage:portage
 for writing logs, no one except root should be allowed to write in
 /var/log/portage. So, from my point of view, the answer is no.
 
 It seems so:
 https://bugs.gentoo.org/show_bug.cgi?id=374287
 https://bugs.gentoo.org/show_bug.cgi?id=378451
 
 This version of portage has just been stabilized this week.
 
 Regards,
 Florian Philipp
 

Argh, sorry. I just saw that I forgot to delete the first paragraph
after looking at portage's changelog. The answer is yes, not no. ;)



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] logrotate: /var/log/portage/elog insecure permissions?

2011-08-28 Thread Mick
On Sunday 07 Aug 2011 16:20:18 Florian Philipp wrote:
 Am 07.08.2011 02:22, schrieb Mick:
  On Friday 05 Aug 2011 23:08:38 Neil Bothwick wrote:
  On Fri, 05 Aug 2011 17:59:00 +0200, Florian Philipp wrote:
  Yes, this was introduced in 3.8.0 to fix security issues [1]. Change
  your config to look like this:
  /var/log/portage/elog/summary.log {
  su portage portage
  ...
  }
  
  Disclaimer: I've not really tried this (yet) but I think I'm able to
  read changelogs and man-pages. ;-)
  
  Yes that fixes it. The latest portage ebuilds include an updated config
  file.
  
  Hmm ... it still complains here!
  
  error: error setting owner of
  /var/log/portage/elog/summary.log-20110801.gz: Operation not permitted
  
  
  This is my /etc/logrotate.d/elog-save-summary:
  ===
  /var/log/portage/elog/summary.log {
  
   su portage portage
   
  missingok
  nocreate
  delaycompress
  
  }
  ===
  
  # ls -la /var/log/portage/elog/summary.log
  -rw-rw-r-- 1 root portage 4326 Aug  6 09:44
  /var/log/portage/elog/summary.log
  
  Can you see anything amiss?
 
 At least on my system, /var/log/portage has the following permissions:
 drwxr-xr-x root root
 
 Only root can write, therefore the config must read
 
 /var/log/portage/elog/summary.log {
  su root portage
  missingok
  nocreate
  delaycompress
 }

The latest logrotate update wanted to change the above line from su root 
portage to su portage portage ...

Should I be changing the ownership of /var/log/portage and /var/log/portage 
elog?
-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] logrotate: /var/log/portage/elog insecure permissions?

2011-08-28 Thread Florian Philipp
Am 28.08.2011 13:14, schrieb Mick:
 On Sunday 07 Aug 2011 16:20:18 Florian Philipp wrote:
 Am 07.08.2011 02:22, schrieb Mick:
 On Friday 05 Aug 2011 23:08:38 Neil Bothwick wrote:
 On Fri, 05 Aug 2011 17:59:00 +0200, Florian Philipp wrote:
 Yes, this was introduced in 3.8.0 to fix security issues [1]. Change
 your config to look like this:
 /var/log/portage/elog/summary.log {
 su portage portage
 ...
 }

 Disclaimer: I've not really tried this (yet) but I think I'm able to
 read changelogs and man-pages. ;-)

 Yes that fixes it. The latest portage ebuilds include an updated config
 file.

 Hmm ... it still complains here!

 error: error setting owner of
 /var/log/portage/elog/summary.log-20110801.gz: Operation not permitted


 This is my /etc/logrotate.d/elog-save-summary:
 ===
 /var/log/portage/elog/summary.log {

  su portage portage
  
 missingok
 nocreate
 delaycompress

 }
 ===

 # ls -la /var/log/portage/elog/summary.log
 -rw-rw-r-- 1 root portage 4326 Aug  6 09:44
 /var/log/portage/elog/summary.log

 Can you see anything amiss?

 At least on my system, /var/log/portage has the following permissions:
 drwxr-xr-x root root

 Only root can write, therefore the config must read

 /var/log/portage/elog/summary.log {
  su root portage
  missingok
  nocreate
  delaycompress
 }
 
 The latest logrotate update wanted to change the above line from su root 
 portage to su portage portage ...
 
 Should I be changing the ownership of /var/log/portage and /var/log/portage 
 elog?

Unless portage now drops privileges from root:portage to portage:portage
for writing logs, no one except root should be allowed to write in
/var/log/portage. So, from my point of view, the answer is no.

It seems so:
https://bugs.gentoo.org/show_bug.cgi?id=374287
https://bugs.gentoo.org/show_bug.cgi?id=378451

This version of portage has just been stabilized this week.

Regards,
Florian Philipp



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] logrotate: /var/log/portage/elog insecure permissions?

2011-08-09 Thread Mick
On Sunday 07 Aug 2011 16:20:18 Florian Philipp wrote:
 Am 07.08.2011 02:22, schrieb Mick:
  On Friday 05 Aug 2011 23:08:38 Neil Bothwick wrote:
  On Fri, 05 Aug 2011 17:59:00 +0200, Florian Philipp wrote:
  Yes, this was introduced in 3.8.0 to fix security issues [1]. Change
  your config to look like this:
  /var/log/portage/elog/summary.log {
  su portage portage
  ...
  }
  
  Disclaimer: I've not really tried this (yet) but I think I'm able to
  read changelogs and man-pages. ;-)
  
  Yes that fixes it. The latest portage ebuilds include an updated config
  file.
  
  Hmm ... it still complains here!
  
  error: error setting owner of
  /var/log/portage/elog/summary.log-20110801.gz: Operation not permitted
  
  
  This is my /etc/logrotate.d/elog-save-summary:
  ===
  /var/log/portage/elog/summary.log {
  
   su portage portage
   
  missingok
  nocreate
  delaycompress
  
  }
  ===
  
  # ls -la /var/log/portage/elog/summary.log
  -rw-rw-r-- 1 root portage 4326 Aug  6 09:44
  /var/log/portage/elog/summary.log
  
  Can you see anything amiss?
 
 At least on my system, /var/log/portage has the following permissions:
 drwxr-xr-x root root
 
 Only root can write, therefore the config must read
 
 /var/log/portage/elog/summary.log {
  su root portage
  missingok
  nocreate
  delaycompress
 }
 
 Hope this helps,
 Florian Philipp

Thanks for this Florian,

It is interesting that two of my machines actually are set up like this:

drwxrws---  2 portage portage 240 Aug  9 21:07 elog

and /var/log/portage is also set up like this:

drwxrws---  4 portage portage 7152 Aug  7 18:04 portage

However, I can't remember if I set it up like that myself (these are old 
machines).  The latest and newest installation on a third box looks just like 
yours.
-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] logrotate: /var/log/portage/elog insecure permissions?

2011-08-07 Thread Florian Philipp
Am 07.08.2011 02:22, schrieb Mick:
 On Friday 05 Aug 2011 23:08:38 Neil Bothwick wrote:
 On Fri, 05 Aug 2011 17:59:00 +0200, Florian Philipp wrote:
 Yes, this was introduced in 3.8.0 to fix security issues [1]. Change
 your config to look like this:
 /var/log/portage/elog/summary.log {
 su portage portage
 ...
 }

 Disclaimer: I've not really tried this (yet) but I think I'm able to
 read changelogs and man-pages. ;-)

 Yes that fixes it. The latest portage ebuilds include an updated config
 file.
 
 Hmm ... it still complains here!
 
 error: error setting owner of /var/log/portage/elog/summary.log-20110801.gz: 
 Operation not permitted
 
 
 This is my /etc/logrotate.d/elog-save-summary:
 ===
 /var/log/portage/elog/summary.log {
  su portage portage
 missingok
 nocreate
 delaycompress
 }
 ===
 
 # ls -la /var/log/portage/elog/summary.log
 -rw-rw-r-- 1 root portage 4326 Aug  6 09:44 /var/log/portage/elog/summary.log
 
 Can you see anything amiss?

At least on my system, /var/log/portage has the following permissions:
drwxr-xr-x root root

Only root can write, therefore the config must read

/var/log/portage/elog/summary.log {
 su root portage
 missingok
 nocreate
 delaycompress
}

Hope this helps,
Florian Philipp



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] logrotate: /var/log/portage/elog insecure permissions?

2011-08-06 Thread Mick
On Friday 05 Aug 2011 23:08:38 Neil Bothwick wrote:
 On Fri, 05 Aug 2011 17:59:00 +0200, Florian Philipp wrote:
  Yes, this was introduced in 3.8.0 to fix security issues [1]. Change
  your config to look like this:
  /var/log/portage/elog/summary.log {
  su portage portage
  ...
  }
  
  Disclaimer: I've not really tried this (yet) but I think I'm able to
  read changelogs and man-pages. ;-)
 
 Yes that fixes it. The latest portage ebuilds include an updated config
 file.

Hmm ... it still complains here!

error: error setting owner of /var/log/portage/elog/summary.log-20110801.gz: 
Operation not permitted


This is my /etc/logrotate.d/elog-save-summary:
===
/var/log/portage/elog/summary.log {
 su portage portage
missingok
nocreate
delaycompress
}
===

# ls -la /var/log/portage/elog/summary.log
-rw-rw-r-- 1 root portage 4326 Aug  6 09:44 /var/log/portage/elog/summary.log

Can you see anything amiss?
-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


[gentoo-user] logrotate: /var/log/portage/elog insecure permissions?

2011-08-05 Thread Jarry

Hi,
today I received this mail from cron:
---
error: skipping /var/log/portage/elog/summary.log because
parent directory has insecure permissions (It's world writable
or writable by group which is not root) Set su directive
in config file to tell logrotate which user/group should be
used for rotation.
---

My /var/log/portage/elog has this permissions:
drwxrws--- 2 portage portage 4096 Jun  1  2010 elog

What is wrong with it? I'm pretty sure I did not touch it
for years so I'm surprised logrotate is suddenly complaining
(it has been updated recently, that might be reason).

Anyway, how should those permissions look like to make
logrotate (and cron) happy?

Jarry

--
___
This mailbox accepts e-mails only from selected mailing-lists!
Everything else is considered to be spam and therefore deleted.



Re: [gentoo-user] logrotate: /var/log/portage/elog insecure permissions?

2011-08-05 Thread Florian Philipp
Am 05.08.2011 17:22, schrieb Jarry:
 Hi,
 today I received this mail from cron:
 ---
 error: skipping /var/log/portage/elog/summary.log because
 parent directory has insecure permissions (It's world writable
 or writable by group which is not root) Set su directive
 in config file to tell logrotate which user/group should be
 used for rotation.
 ---
 
 My /var/log/portage/elog has this permissions:
 drwxrws--- 2 portage portage 4096 Jun  1  2010 elog
 
 What is wrong with it? I'm pretty sure I did not touch it
 for years so I'm surprised logrotate is suddenly complaining
 (it has been updated recently, that might be reason).
 
 Anyway, how should those permissions look like to make
 logrotate (and cron) happy?
 
 Jarry
 

Yes, this was introduced in 3.8.0 to fix security issues [1]. Change
your config to look like this:
/var/log/portage/elog/summary.log {
su portage portage
...
}

Disclaimer: I've not really tried this (yet) but I think I'm able to
read changelogs and man-pages. ;-)

[1] https://bugzilla.redhat.com/show_bug.cgi?id=680799

Regards,
Florian Philipp



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] logrotate: /var/log/portage/elog insecure permissions?

2011-08-05 Thread Neil Bothwick
On Fri, 05 Aug 2011 17:59:00 +0200, Florian Philipp wrote:

 Yes, this was introduced in 3.8.0 to fix security issues [1]. Change
 your config to look like this:
 /var/log/portage/elog/summary.log {
 su portage portage
 ...
 }
 
 Disclaimer: I've not really tried this (yet) but I think I'm able to
 read changelogs and man-pages. ;-)

Yes that fixes it. The latest portage ebuilds include an updated config
file.


-- 
Neil Bothwick

There's no such thing as a free lunch
  ___Steve Ballmer, choking on a linuxburger


signature.asc
Description: PGP signature


Re: [gentoo-user] logrotate blocks portage?

2011-07-28 Thread Walter Dnes
On Thu, Jul 28, 2011 at 11:43:46AM +0700, Pandu Poluan wrote

   (app-admin/logrotate-3.7.9-r2::gentoo, installed) pulled in by
 app-admin/logrotate required by (net-proxy/squid-3.1.8::gentoo, installed)
 app-admin/logrotate required by @selected
 
   (sys-apps/portage-2.2.0_alpha47::gentoo, ebuild scheduled for merge)
 pulled in by
 sys-apps/portage required by @selected
 sys-apps/portage required by (virtual/package-manager-0::gentoo, 
 installed)
 sys-apps/portage required by
 (app-portage/gentoolkit-0.3.0.4::gentoo, installed)
 =sys-apps/portage-2.1.6 required by
 (app-admin/python-updater-0.9::gentoo, installed)
 
 Oookay. So. How can I solve this conundrum? I *need* squid.

  It looks like you currently have an older version of portage and
gentoolkit wants a newer one.  But emerge intends to update portage
after installing gentoolkit.  Try the following...

emerge portage

...and then...

emerge -avuND @world

  Are you running ~x86 or have you keyworded or masked portage?

-- 
Walter Dnes waltd...@waltdnes.org



Re: [gentoo-user] logrotate blocks portage?

2011-07-28 Thread Walter Dnes
  One more question... when you ran emerge --sync, did you see a
message telling you to update portage immediately?  When you see that
message, do it right away before updating anything else.

-- 
Walter Dnes waltd...@waltdnes.org



Re: [gentoo-user] logrotate blocks portage?

2011-07-28 Thread Pandu Poluan
On Thu, Jul 28, 2011 at 13:34, Walter Dnes waltd...@waltdnes.org wrote:
  One more question... when you ran emerge --sync, did you see a
 message telling you to update portage immediately?  When you see that
 message, do it right away before updating anything else.

 --
 Walter Dnes waltd...@waltdnes.org


My `emerge --sync` happens every midnigt. I'll run one now and see what pops up.

Rgds,
-- 
Pandu E Poluan
~ IT Optimizer ~

 • Blog : http://pepoluan.tumblr.com
 • Linked-In : http://id.linkedin.com/in/pepoluan



Re: [gentoo-user] logrotate blocks portage?

2011-07-28 Thread Pandu Poluan
On Thu, Jul 28, 2011 at 13:39, Pandu Poluan pa...@poluan.info wrote:
 On Thu, Jul 28, 2011 at 13:34, Walter Dnes waltd...@waltdnes.org wrote:
  One more question... when you ran emerge --sync, did you see a
 message telling you to update portage immediately?  When you see that
 message, do it right away before updating anything else.


 My `emerge --sync` happens every midnigt. I'll run one now and see what pops 
 up.


`emerge --sync` tells me to update portage, but `emerge -av portage`
still blocks :(

Total: 1 package (1 upgrade), Size of downloads: 832 kB
Conflict: 1 block (1 unsatisfied)

 * Error: The above package list contains packages which cannot be
 * installed at the same time on the same system.

  (app-admin/logrotate-3.7.9-r2::gentoo, installed) pulled in by
app-admin/logrotate required by @selected

  (sys-apps/portage-2.2.0_alpha47::gentoo, ebuild scheduled for merge)
pulled in by
portage


Rgds,
-- 
Pandu E Poluan
~ IT Optimizer ~

 • Blog : http://pepoluan.tumblr.com
 • Linked-In : http://id.linkedin.com/in/pepoluan



[gentoo-user] logrotate blocks portage?

2011-07-27 Thread Pandu Poluan
Tried `emerge -avuND @world` and found out that logrotate blocks portage :

Total: 17 packages (13 upgrades, 1 downgrade, 2 new, 1 in new slot),
Size of downloads: 39,167 kB
Conflict: 1 block (1 unsatisfied)

 * Error: The above package list contains packages which cannot be
 * installed at the same time on the same system.

  (app-admin/logrotate-3.7.9-r2::gentoo, installed) pulled in by
app-admin/logrotate required by (net-proxy/squid-3.1.8::gentoo, installed)
app-admin/logrotate required by @selected

  (sys-apps/portage-2.2.0_alpha47::gentoo, ebuild scheduled for merge)
pulled in by
sys-apps/portage required by @selected
sys-apps/portage required by (virtual/package-manager-0::gentoo, installed)
sys-apps/portage required by
(app-portage/gentoolkit-0.3.0.4::gentoo, installed)
=sys-apps/portage-2.1.6 required by
(app-admin/python-updater-0.9::gentoo, installed)

Oookay. So. How can I solve this conundrum? I *need* squid.

Rgds,
-- 
Pandu E Poluan
~ IT Optimizer ~

 • Blog : http://pepoluan.tumblr.com
 • Linked-In : http://id.linkedin.com/in/pepoluan



[gentoo-user] logrotate fails since a few days

2010-07-12 Thread Helmut Jarausch
Hi,

since a few days logrotate is failing due to
error: stat of /var/account/pacct failed: No such file or directory

What has changed, what am I missing?

Many thanks for a hint,
Helmut.


-- 
Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany




Re: [gentoo-user] logrotate fails since a few days

2010-07-12 Thread Enrico Weigelt
* Helmut Jarausch jarau...@igpm.rwth-aachen.de wrote:
 Hi,
 
 since a few days logrotate is failing due to
 error: stat of /var/account/pacct failed: No such file or directory

do you have the process accounting deamon running ? 

did you instruct logrotate to create this logfile if missing ?


cu
-- 
--
 Enrico Weigelt, metux IT service -- http://www.metux.de/

 phone:  +49 36207 519931  email: weig...@metux.de
 mobile: +49 151 27565287  icq:   210169427 skype: nekrad666
--
 Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme
--



Re: [gentoo-user] logrotate fails since a few days

2010-07-12 Thread Helmut Jarausch
On 07/12/10 11:00:00, Enrico Weigelt wrote:
 * Helmut Jarausch jarau...@igpm.rwth-aachen.de wrote:
  Hi,
  
  since a few days logrotate is failing due to
  error: stat of /var/account/pacct failed: No such file or directory
 
 do you have the process accounting deamon running ? 

No, and I've never done so.

 
 did you instruct logrotate to create this logfile if missing ?
 
No, but how to do that? I have'ne found anything in the man file?

Thanks,
Helmut.





[gentoo-user] logrotate - strange error message

2010-05-10 Thread Helmut Jarausch
Hi,
I have the following file as /etc/logrotate.d/denyhosts
/var/log/denyhosts {
missingok
notifempty
create 0640 root root
sharedscripts
prerotate
/etc/init.d/denyhosts stop
endscript
postrotate
/etc/init.d/denyhosts start
endscript
}

But this causes errors
reading config info for /var/log/denyhosts 
error: denyhosts:1 lines must begin with a keyword or a filename (possibly in 
double quotes)
error: denyhosts:2 unexpected text
error: denyhosts:3 unexpected text
error: denyhosts:4 unexpected text
error: denyhosts:5 unexpected text
error: denyhosts:prerotate or postrotate without endscript

I appreciate any help on this.
Many thanks,
Helmut.





Re: [gentoo-user] logrotate - strange error message

2010-05-10 Thread Alan McKinnon
On Monday 10 May 2010 09:46:11 Helmut Jarausch wrote:
 Hi,
 I have the following file as /etc/logrotate.d/denyhosts
 /var/log/denyhosts {
   missingok
   notifempty
   create 0640 root root
   sharedscripts
   prerotate
   /etc/init.d/denyhosts stop
   endscript
   postrotate
   /etc/init.d/denyhosts start
   endscript
 }
 
 But this causes errors
 reading config info for /var/log/denyhosts
 error: denyhosts:1 lines must begin with a keyword or a filename (possibly
 in double quotes) error: denyhosts:2 unexpected text
 error: denyhosts:3 unexpected text
 error: denyhosts:4 unexpected text
 error: denyhosts:5 unexpected text
 error: denyhosts:prerotate or postrotate without endscript


That file is correct, so I'd first check the file that is read *before* that 
one, looking for things like missing end braces etc etc

logrotate -d /etc/logrotate.conf will show the read order


-- 
alan dot mckinnon at gmail dot com



Re: [gentoo-user] logrotate - strange error message

2010-05-10 Thread Helmut Jarausch
On 10 May, Alan McKinnon wrote:
 On Monday 10 May 2010 09:46:11 Helmut Jarausch wrote:
 Hi,
 I have the following file as /etc/logrotate.d/denyhosts
 /var/log/denyhosts {
  missingok
  notifempty
  create 0640 root root
  sharedscripts
  prerotate
  /etc/init.d/denyhosts stop
  endscript
  postrotate
  /etc/init.d/denyhosts start
  endscript
 }
 
 But this causes errors
 reading config info for /var/log/denyhosts
 error: denyhosts:1 lines must begin with a keyword or a filename (possibly
 in double quotes) error: denyhosts:2 unexpected text
 error: denyhosts:3 unexpected text
 error: denyhosts:4 unexpected text
 error: denyhosts:5 unexpected text
 error: denyhosts:prerotate or postrotate without endscript
 
 
 That file is correct, so I'd first check the file that is read *before* that 
 one, looking for things like missing end braces etc etc
 
 logrotate -d /etc/logrotate.conf will show the read order
 
 

Thanks, Alan,

the file before is indeed a bit different

# $Header: 
/var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.logrotate,v 1.2 
2004/07/18 02:25:02 dragonheart Exp $
#
# cups logrotate snippet for Gentoo Linux
#


/var/log/cups/error_log /var/log/cups/access_log /var/log/cups/page_log {
sharedscripts
postrotate
/etc/init.d/syslog-ng reload  /dev/null 21 || true
endscript
}

It has multiple file names in the first line.
Is this OK?

Helmut.




Re: [gentoo-user] logrotate - strange error message

2010-05-10 Thread Alan McKinnon
On Monday 10 May 2010 11:40:29 Helmut Jarausch wrote:
 On 10 May, Alan McKinnon wrote:
  On Monday 10 May 2010 09:46:11 Helmut Jarausch wrote:
  Hi,
  I have the following file as /etc/logrotate.d/denyhosts
  /var/log/denyhosts {
  
 missingok
 notifempty
 create 0640 root root
 sharedscripts
 prerotate
 
 /etc/init.d/denyhosts stop
 
 endscript
 postrotate
 
 /etc/init.d/denyhosts start
 
 endscript
  
  }
  
  But this causes errors
  reading config info for /var/log/denyhosts
  error: denyhosts:1 lines must begin with a keyword or a filename
  (possibly in double quotes) error: denyhosts:2 unexpected text
  error: denyhosts:3 unexpected text
  error: denyhosts:4 unexpected text
  error: denyhosts:5 unexpected text
  error: denyhosts:prerotate or postrotate without endscript
  
  That file is correct, so I'd first check the file that is read *before*
  that one, looking for things like missing end braces etc etc
  
  logrotate -d /etc/logrotate.conf will show the read order
 
 Thanks, Alan,
 
 the file before is indeed a bit different
 
 # $Header:
 /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.logrotate,v
 1.2 2004/07/18 02:25:02 dragonheart Exp $ #
 # cups logrotate snippet for Gentoo Linux
 #
 
 
 /var/log/cups/error_log /var/log/cups/access_log /var/log/cups/page_log {
 sharedscripts
 postrotate
 /etc/init.d/syslog-ng reload  /dev/null 21 || true
 endscript
 }
 
 It has multiple file names in the first line.
 Is this OK?

Yes, that's fine - logrotate supports that.

Please hash out all the lines in the denyhosts rotate file and run 
logrotate -d /etc/logrotate.conf
Then let's see what error comes up.

-- 
alan dot mckinnon at gmail dot com



Re: [gentoo-user] logrotate - strange error message

2010-05-10 Thread Tomáš Linhart
2010/5/10 Alan McKinnon alan.mckin...@gmail.com:
 Please hash out all the lines in the denyhosts rotate file and run
 logrotate -d /etc/logrotate.conf
 Then let's see what error comes up.

 --
 alan dot mckinnon at gmail dot com



I hit the same problem few days ago but I didn't look for a solution
until today.
When I tried to run logrotate -d /etc/logrotate.d/denyhosts, it still
fails with the same error.

Finally I took a close look at the file /etc/logrotate.d/denyhosts and
I discovered that it contains CRLF as line separators. Converting them
to LF has solved the problem.

I just file a bug about it. See http://bugs.gentoo.org/show_bug.cgi?id=319133

Hope this helps.

Tomáš



Re: [gentoo-user] logrotate

2008-09-27 Thread Alan McKinnon
On Friday 26 September 2008 09:49:57 Kaushal Shriyan wrote:
 Hi,

 I am using logrotate utility on gentoo to compress catalina.out file. 

[snip]

 error: unable to open /var/log/tomcat5/catalina.out.1 for compression

First thing to check is that the user doing this operation has write 
permission to this *directory*, or write permissions to the filesystem it 
resides on


-- 
alan dot mckinnon at gmail dot com



[gentoo-user] Logrotate status error

2008-08-09 Thread Mick
Hi All,

I have noticed that the log files on a box of mine are getting larger than 
expected.  I ran logrotate by hand to see if I get any errors and this came 
up:

# logrotate -f /etc/logrotate.conf 
error: line too long in state file /var/lib/logrotate.status
# ls -la /var/lib/logrotate.status 
-rw-r--r-- 1 root root 360448 Dec  9  2007 /var/lib/logrotate.status

Can you explain it?  Should I just remove it before I run logrotate again?
-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


[gentoo-user] logrotate not working

2007-09-25 Thread Arnau Bria
Hi,

I have this in my logroate.d/apache
# Apache2 logrotate snipet for Gentoo Linux
# Contributes by Chuck Short
#
/var/log/apache2/*log {
 daily
  missingok
  notifempty
  size 5M
  sharedscripts
  postrotate
  /etc/init.d/apache2 reload  /dev/null 21 || true
  endscript
}

And my logs are:

# ls -lsah blog_log_access_common
 20M -rw-r--r-- 1 root   root20M sep 25 12:04 blog_log_access_common
196K -rw-r--r-- 1 apache apache 190K feb 18  2007 blog_log_access_common.10.gz
152K -rw-r--r-- 1 apache apache 147K feb 16  2007 blog_log_access_common.11.gz
128K -rw-r--r-- 1 apache apache 122K feb 13  2007 blog_log_access_common.12.gz
236K -rw-r--r-- 1 apache apache 232K feb 10  2007 blog_log_access_common.13.gz
208K -rw-r--r-- 1 apache apache 203K feb  3  2007 blog_log_access_common.14.gz
188K -rw-r--r-- 1 apache apache 182K ene 30  2007 blog_log_access_common.15.gz
168K -rw-r--r-- 1 apache apache 163K mar 11  2007 blog_log_access_common.1.gz
196K -rw-r--r-- 1 apache apache 190K mar  9  2007 blog_log_access_common.2.gz
160K -rw-r--r-- 1 apache apache 156K mar  7  2007 blog_log_access_common.3.gz
164K -rw-r--r-- 1 apache apache 159K mar  5  2007 blog_log_access_common.4.gz
252K -rw-r--r-- 1 apache apache 245K mar  3  2007 blog_log_access_common.5.gz
152K -rw-r--r-- 1 apache apache 148K mar  1  2007 blog_log_access_common.6.gz
172K -rw-r--r-- 1 apache apache 166K feb 26  2007 blog_log_access_common.7.gz
168K -rw-r--r-- 1 apache apache 162K feb 23  2007 blog_log_access_common.8.gz
208K -rw-r--r-- 1 apache apache 201K feb 21  2007 blog_log_access_common.9.gz


I run it:

afrodita apache2 #  /usr/sbin/logrotate /etc/logrotate.conf
afrodita apache2 # 

And again:
 20M -rw-r--r-- 1 root   root20M sep 25 12:04 blog_log_access_common
196K -rw-r--r-- 1 apache apache 190K feb 18  2007 blog_log_access_common.10.gz
152K -rw-r--r-- 1 apache apache 147K feb 16  2007 blog_log_access_common.11.gz
128K -rw-r--r-- 1 apache apache 122K feb 13  2007 blog_log_access_common.12.gz
236K -rw-r--r-- 1 apache apache 232K feb 10  2007 blog_log_access_common.13.gz
208K -rw-r--r-- 1 apache apache 203K feb  3  2007 blog_log_access_common.14.gz
188K -rw-r--r-- 1 apache apache 182K ene 30  2007 blog_log_access_common.15.gz
168K -rw-r--r-- 1 apache apache 163K mar 11  2007 blog_log_access_common.1.gz
196K -rw-r--r-- 1 apache apache 190K mar  9  2007 blog_log_access_common.2.gz
160K -rw-r--r-- 1 apache apache 156K mar  7  2007 blog_log_access_common.3.gz
164K -rw-r--r-- 1 apache apache 159K mar  5  2007 blog_log_access_common.4.gz
252K -rw-r--r-- 1 apache apache 245K mar  3  2007 blog_log_access_common.5.gz
152K -rw-r--r-- 1 apache apache 148K mar  1  2007 blog_log_access_common.6.gz
172K -rw-r--r-- 1 apache apache 166K feb 26  2007 blog_log_access_common.7.gz
168K -rw-r--r-- 1 apache apache 162K feb 23  2007 blog_log_access_common.8.gz
208K -rw-r--r-- 1 apache apache 201K feb 21  2007 blog_log_access_common.9.gz

And logroate.conf:
 # cat /etc/logrotate.conf |grep .|grep -v ^#
weekly
rotate 4
create
compress
include /etc/logrotate.d
notifempty
nomail
noolddir
/var/log/wtmp {
monthly
create 0664 root utmp
rotate 1
}

# eix -c logrotate
[I] app-admin/logrotate ([EMAIL PROTECTED]/03/07): Rotates, compresses, and 
mails system logs

Any clue on what's happening?¿
TIA

-- 
Arnau Bria
http://blog.emergetux.net
Bombing for peace is like fucking for virginity
--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] logrotate not working

2007-09-25 Thread Neil Bothwick
On Tue, 25 Sep 2007 12:06:09 +0200, Arnau Bria wrote:

 I have this in my logroate.d/apache
 # Apache2 logrotate snipet for Gentoo Linux
 # Contributes by Chuck Short
 #
 /var/log/apache2/*log {
  daily
   missingok
   notifempty
   size 5M
   sharedscripts
   postrotate
   /etc/init.d/apache2 reload  /dev/null 21 || true
   endscript
 }
 
 And my logs are:
 
 # ls -lsah blog_log_access_common
  20M -rw-r--r-- 1 root   root20M sep 25 12:04 blog_log_access_common

blog_log_access_common does not match the *log pattern in the config file.


-- 
Neil Bothwick

... ebius tagline. This is a moebius tagline. This is a mo ...


signature.asc
Description: PGP signature


Re: [gentoo-user] logrotate not working

2007-09-25 Thread Arnau Bria
On Tue, 25 Sep 2007 12:36:57 +0100
Neil Bothwick wrote:

 On Tue, 25 Sep 2007 12:06:09 +0200, Arnau Bria wrote:
 
[...]
 blog_log_access_common does not match the *log pattern in the config
 file.
You're completely right...

apache2/access_fotos.emergetux.net_log   apache2/blog_log_access_common 
 apache2/ssl_access_log
apache2/access_log   
apache2/error_fotos.emergetux.net_log   apache2/ssl_error_log
apache2/access_phpmyadmin.emergetux.net_log  apache2/error_log  
 apache2/ssl_request_log
apache2/blog_error_log   
apache2/error_phpmyadmin.emergetux.net_log

that's just the only log not ended in log...

Thanks and sorry for spamming!

-- 
Arnau Bria
http://blog.emergetux.net
Bombing for peace is like fucking for virginity
-- 
[EMAIL PROTECTED] mailing list



[gentoo-user] logrotate

2007-08-13 Thread Arnau Bria
Hi,

I have my logrotate configured but it does not work propertly.
Let me explain:
 mail # ls -lsah
total 20M
4,0K drw---  2 root root 4,0K ago 13 03:10 .
4,0K drwxr-xr-x 15 root root 4,0K ago 13 03:10 ..
 15M -rw---  1 root root  15M ago 13 12:38 mail.log
2,4M -rw---  1 root root 2,4M ago 13 03:10 mail.log.1.gz
336K -rw---  1 root root 331K ago 12 03:10 mail.log.2.gz
2,4M -rw---  1 root root 2,4M ago 12 00:02 mail.log.3.gz
364K -rw---  1 root root 360K ago 11 03:10 mail.log.4.gz

Seems it worked for days 11 12 and 13, but then, it keeps just one file
and increases its size till I delete it, or I run logrotate by hand:

afrodita mail #  /usr/sbin/logrotate /etc/logrotate.conf
afrodita mail # ls -lsah
total 5,9M
4,0K drw---  2 root root 4,0K ago 13 12:40 .
4,0K drwxr-xr-x 15 root root 4,0K ago 13 12:40 ..
4,0K -rw---  1 root root 2,0K ago 13 12:40 mail.log
936K -rw---  1 root root 932K ago 13 12:40 mail.log.1.gz
2,4M -rw---  1 root root 2,4M ago 13 03:10 mail.log.2.gz
336K -rw---  1 root root 331K ago 12 03:10 mail.log.3.gz
2,4M -rw---  1 root root 2,4M ago 12 00:02 mail.log.4.gz

I have logrotate in crontab:
# crontab -l
[...]
2 0 * * *   /usr/sbin/logrotate /etc/logrotate.conf

and this is its conf:
In logrotate.conf:

include /etc/logrotate.d

and there

 # cat /etc/logrotate.d/mail 
# Apache2 logrotate snipet for Gentoo Linux
# Contributes by Chuck Short
#
/var/log/mail/*log {
  missingok
  notifempty
  sharedscripts
  size 5M
  postrotate
  /etc/init.d/postfix reload  /dev/null 21 || true
  endscript
}

Things get worst in apache logs:
182M -rw-r--r--  1 apache apache 182M ago 13 12:37 blog_log_access_common
# cat /etc/logrotate.d/apache2 
# Apache2 logrotate snipet for Gentoo Linux
# Contributes by Chuck Short
#
/var/log/apache2/*log {
 daily
  missingok
  notifempty
  sharedscripts
  postrotate
  /etc/init.d/apache2 reload  /dev/null 21 || true
  endscript
}


182 MB daily? I'm not a google server!

TIA,
-- 
Arnau Bria
http://blog.emergetux.net
Bombing for peace is like fucking for virginity
-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] logrotate

2007-08-13 Thread James Ausmus
On 8/13/07, Arnau Bria [EMAIL PROTECTED] wrote:
 Hi,

 I have my logrotate configured but it does not work propertly.
snip
 I have logrotate in crontab:
 # crontab -l
 [...]
 2 0 * * *   /usr/sbin/logrotate /etc/logrotate.conf

Just a stab in the dark - do you have your cron service running? Can
you test that it properly runs other cron scripts?

If you change the cron line to redirect any stdout + stderr output to
a file, do you get anything?

HTH-

James
-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] logrotate

2007-08-13 Thread James Ausmus
On 8/13/07, Arnau Bria [EMAIL PROTECTED] wrote:
 On Mon, 13 Aug 2007 07:18:49 -0700
 James Ausmus wrote:

  On 8/13/07, Arnau Bria [EMAIL PROTECTED] wrote:
 [...]
  Just a stab in the dark - do you have your cron service running? Can
  you test that it properly runs other cron scripts?
 Yep, cause I have 5 gziped log files, so I works until the fifth file...

Have you verified it? If you do a

ps -elf | grep -i cron

Is there a /usr/sbin/cron listed?

Just because it worked before doesn't mean it didn't die since. :)
I've discovered (many times, the hard way, over and over ;) that it is
unwise to make any assumptions when troubleshooting issues - if you
do, then you can be very far down a complicated road to resolution
when you discover it is a very basic issue that would have taken 10
seconds to fix. :)

-James



  If you change the cron line to redirect any stdout + stderr output to
  a file, do you get anything?
 Did not test, but gonna do it.

  HTH-
 
  James
 Cheers,
 Arnau

 --
 Arnau Bria
 http://blog.emergetux.net
 Bombing for peace is like fucking for virginity
 --
 [EMAIL PROTECTED] mailing list


-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] logrotate

2007-08-13 Thread Arnau Bria
On Mon, 13 Aug 2007 07:18:49 -0700
James Ausmus wrote:

 On 8/13/07, Arnau Bria [EMAIL PROTECTED] wrote:
[...]
 Just a stab in the dark - do you have your cron service running? Can
 you test that it properly runs other cron scripts?
Yep, cause I have 5 gziped log files, so I works until the fifth file...

 If you change the cron line to redirect any stdout + stderr output to
 a file, do you get anything?
Did not test, but gonna do it.
 
 HTH-
 
 James
Cheers,
Arnau

-- 
Arnau Bria
http://blog.emergetux.net
Bombing for peace is like fucking for virginity
-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] logrotate

2007-08-13 Thread Arnau Bria
On Mon, 13 Aug 2007 08:19:17 -0700
James Ausmus wrote:

 On 8/13/07, Arnau Bria [EMAIL PROTECTED] wrote:
  On Mon, 13 Aug 2007 07:18:49 -0700
  James Ausmus wrote:
 
   On 8/13/07, Arnau Bria [EMAIL PROTECTED] wrote:
  [...]
   Just a stab in the dark - do you have your cron service running?
   Can you test that it properly runs other cron scripts?
  Yep, cause I have 5 gziped log files, so I works until the fifth
  file...
 
 Have you verified it? If you do a
 
 ps -elf | grep -i cron
 
 Is there a /usr/sbin/cron listed?
 [EMAIL PROTECTED] ~ $ ps -elf | grep -i cron
5 S root  7880 1  0  76   0 -   540 -  01:42 ?00:00:00 
/usr/sbin/cron

 Just because it worked before doesn't mean it didn't die since. :)
Well, in fact is a problem that has repeated so many times that I have
to find a solution...I've asked in some list, and got no solution...

So, it's not first time.

 I've discovered (many times, the hard way, over and over ;) that it is
 unwise to make any assumptions when troubleshooting issues - if you
 do, then you can be very far down a complicated road to resolution
 when you discover it is a very basic issue that would have taken 10
 seconds to fix. :)
Yep, sometimes is just you have your network wire unplugged...  ;-)

 -James
Thanks for your help.

-- 
Arnau Bria
http://blog.emergetux.net
Bombing for peace is like fucking for virginity
-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] logrotate desn't create new empty files

2007-08-11 Thread Jakob
On 8/5/07, Mick [EMAIL PROTECTED] wrote:

 I am not sure I understand that doesn't work:

 It does not rotate the message log file at all?
 It rotates it but does not create a new empty message log file after rotation?
Thanks for your reply and sorry for answering so late.
rotating the logs woks fine, the problem was that it didn't create new
empty log.
and because of size 5M it rotated the logs every day after it reached
the size 5M and didn't create new empty files.

I thinkl the problem was the copy parameter, it seems to work now.

Thanks to all people who helped me.
Regards

Jakob
-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] logrotate desn't create new empty files

2007-08-05 Thread Jakob
 Look for a dead.letter file in /root which may contain any errors of the
 logrotate script.  In my system there is /etc/logrotate.d/syslog-ng which
 contains:
 ===
 #
 $Header: 
 /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.logrotate,v
 1.2 2004/07/18 02:25:02 dragonheart Exp $
 #
 # Syslog-ng logrotate snippet for Gentoo Linux
 # contributed by Michael Sterrett
 #

 /var/log/messages {
 sharedscripts
 postrotate
 /etc/init.d/syslog-ng reload  /dev/null 21 || true
 endscript
 }
 ===

 It seems to rotate the messages log file fine and create compressed backups
 within /var/log.  If you have both scripts then there may be a conflict which
 would probably be captured in dead.letter.

 HTH.
 --
 Regards,
 Mick

Thanks for that hint, but there was nothing about logrotate in dead.letter.
logrotate itself works fine for me but I want the messages file erased
after rotating and start with a new file and that doesn't work.
any more ideas?

Regards

Jakob
-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] logrotate desn't create new empty files

2007-08-05 Thread Mick
On Sunday 05 August 2007 08:36, Jakob wrote:

 Thanks for that hint, but there was nothing about logrotate in dead.letter.
 logrotate itself works fine for me but I want the messages file erased
 after rotating and start with a new file and that doesn't work.
 any more ideas?

I am not sure I understand that doesn't work:

It does not rotate the message log file at all?
It rotates it but does not create a new empty message log file after rotation?  

Anyway, look at your script in /etc/logrotate.d/syslog-ng:

Your entry for olddir is redundant.  The rotated logs will remain in 
the /var/log directory anyway.  Use olddir if you want to place them 
somewhere else; e.g. /var/log/old_messages, but make sure that the new 
directory old_messages is owned by root:root.

As already commented by Matthias Guede, the entry copy is not appropriate if 
you want to actually rotate the log file as opposed to just copy it.

The entry create 0600 root root is also redundant as you already specify 
create as a default option in your /etc/logrotate.conf.  (This may mess 
things up.)

Finally, the size at 5M is relatively large so rotation is not going to take 
place that often unless you force it.

HTH.
-- 
Regards,
Mick


pgpYNnzpSW2GX.pgp
Description: PGP signature


Re: [gentoo-user] logrotate desn't create new empty files

2007-08-04 Thread Jakob
 from LOGROTATE(8):

 Here  is  more information on the directives which may be included in a
 logrotate configuration file:

 [...]

 copy   Make  a  copy  of the log file, but don't change the original at
   all.  This option can be used, for instance, to make a  snapshot
   of  the  current  log  file, or when some other utility needs to
   truncate or pare the file.  When this option is used, the create
   option  will have no effect, as the old log file stays in place.
 --
 [EMAIL PROTECTED] mailing list


Thanks for that, I deleated copy, but it seams that the problem stays :-(
-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] logrotate desn't create new empty files

2007-08-04 Thread Mick
On Saturday 04 August 2007 09:29, Jakob wrote:
  from LOGROTATE(8):
 
  Here  is  more information on the directives which may be included in a
  logrotate configuration file:
 
  [...]
 
  copy   Make  a  copy  of the log file, but don't change the original at
all.  This option can be used, for instance, to make a 
  snapshot of  the  current  log  file, or when some other utility needs to
  truncate or pare the file.  When this option is used, the create option 
  will have no effect, as the old log file stays in place. --
  [EMAIL PROTECTED] mailing list

 Thanks for that, I deleated copy, but it seams that the problem stays :-(

Look for a dead.letter file in /root which may contain any errors of the 
logrotate script.  In my system there is /etc/logrotate.d/syslog-ng which 
contains:
===
# 
$Header: 
/var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.logrotate,v 
1.2 2004/07/18 02:25:02 dragonheart Exp $
#
# Syslog-ng logrotate snippet for Gentoo Linux
# contributed by Michael Sterrett
#

/var/log/messages {
sharedscripts
postrotate
/etc/init.d/syslog-ng reload  /dev/null 21 || true
endscript
}
===

It seems to rotate the messages log file fine and create compressed backups 
within /var/log.  If you have both scripts then there may be a conflict which 
would probably be captured in dead.letter.

HTH.
-- 
Regards,
Mick


pgpDvdj3kSFaQ.pgp
Description: PGP signature


[gentoo-user] logrotate desn't create new empty files

2007-08-03 Thread Jakob
Hi all,

I'm running logrotate on my homeserver and the logs are rotated
correctly but after rotating it should create new empty log files and
that doesnt work.

here are my confs:
/etc/logrotate.conf:
# $Header: /var/cvsroot/gentoo-x86/app-admin/logrotate/files/logrotate.conf,v
1.2 2004/07/18 01:58:24 dragonheart Exp $
#
# Logrotate default configuration file for Gentoo Linux
#
# See man logrotate for details

# rotate log files weekly
weekly
#daily

# keep 4 weeks worth of backlogs
rotate 10

# create new (empty) log files after rotating old ones
create

# uncomment this if you want your log files compressed
compress

# packages can drop log rotation information into this directory
include /etc/logrotate.d

notifempty
nomail
noolddir

# no packages own lastlog or wtmp -- we'll rotate them here
/var/log/wtmp {
monthly
create 0664 root utmp
rotate 1
}

# system-specific logs may be also be configured here.

 and /etc/logrotate.d/syslog-ng:
# $Header: 
/var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.logrotate,v
1.2 2004/07/18 02:25:02 dragonheart Exp $
#
# Syslog-ng logrotate snippet for Gentoo Linux
# contributed by Michael Sterrett
#

/var/log/messages {
  dateext
  olddir /var/log/
  copy
  create 0600 root root
  size 5000k
  sharedscripts
  postrotate
/etc/init.d/syslog-ng reload  /dev/null 21 || true
  endscript
}

I thought create will do this but it doesn't work and my logs getting
bigger and bigger.
What did I do wron?

Regards

Jakob
-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] logrotate desn't create new empty files

2007-08-03 Thread Matthias Guede
2007/8/3, Jakob [EMAIL PROTECTED]:
 Hi all,

 I'm running logrotate on my homeserver and the logs are rotated
 correctly but after rotating it should create new empty log files and
 that doesnt work.

 here are my confs:
 /etc/logrotate.conf:
 # $Header: /var/cvsroot/gentoo-x86/app-admin/logrotate/files/logrotate.conf,v
 1.2 2004/07/18 01:58:24 dragonheart Exp $
 #
 # Logrotate default configuration file for Gentoo Linux
 #
 # See man logrotate for details

 # rotate log files weekly
 weekly
 #daily

 # keep 4 weeks worth of backlogs
 rotate 10

 # create new (empty) log files after rotating old ones
 create

 # uncomment this if you want your log files compressed
 compress

 # packages can drop log rotation information into this directory
 include /etc/logrotate.d

 notifempty
 nomail
 noolddir

 # no packages own lastlog or wtmp -- we'll rotate them here
 /var/log/wtmp {
 monthly
 create 0664 root utmp
 rotate 1
 }

 # system-specific logs may be also be configured here.

  and /etc/logrotate.d/syslog-ng:
 # $Header: 
 /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.logrotate,v
 1.2 2004/07/18 02:25:02 dragonheart Exp $
 #
 # Syslog-ng logrotate snippet for Gentoo Linux
 # contributed by Michael Sterrett
 #

 /var/log/messages {
   dateext
   olddir /var/log/
   copy
   create 0600 root root
   size 5000k
   sharedscripts
   postrotate
 /etc/init.d/syslog-ng reload  /dev/null 21 || true
   endscript
 }

 I thought create will do this but it doesn't work and my logs getting
 bigger and bigger.
 What did I do wron?

 Regards

 Jakob
 --
 [EMAIL PROTECTED] mailing list



from LOGROTATE(8):

Here  is  more information on the directives which may be included in a
logrotate configuration file:

[...]

copy   Make  a  copy  of the log file, but don't change the original at
  all.  This option can be used, for instance, to make a  snapshot
  of  the  current  log  file, or when some other utility needs to
  truncate or pare the file.  When this option is used, the create
  option  will have no effect, as the old log file stays in place.
-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] logrotate desn't create new empty files

2007-08-03 Thread Dale
Jakob wrote:
 Hi all,

 I'm running logrotate on my homeserver and the logs are rotated
 correctly but after rotating it should create new empty log files and
 that doesnt work.

 here are my confs:
 /etc/logrotate.conf:
 # $Header: /var/cvsroot/gentoo-x86/app-admin/logrotate/files/logrotate.conf,v
 1.2 2004/07/18 01:58:24 dragonheart Exp $
 #
 # Logrotate default configuration file for Gentoo Linux
 #
 # See man logrotate for details

 # rotate log files weekly
 weekly
 #daily

 # keep 4 weeks worth of backlogs
 rotate 10

 # create new (empty) log files after rotating old ones
 create

 # uncomment this if you want your log files compressed
 compress

 # packages can drop log rotation information into this directory
 include /etc/logrotate.d

 notifempty
 nomail
 noolddir

 # no packages own lastlog or wtmp -- we'll rotate them here
 /var/log/wtmp {
 monthly
 create 0664 root utmp
 rotate 1
 }

 # system-specific logs may be also be configured here.

  and /etc/logrotate.d/syslog-ng:
 # $Header: 
 /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.logrotate,v
 1.2 2004/07/18 02:25:02 dragonheart Exp $
 #
 # Syslog-ng logrotate snippet for Gentoo Linux
 # contributed by Michael Sterrett
 #

 /var/log/messages {
   dateext
   olddir /var/log/
   copy
   create 0600 root root
   size 5000k
   sharedscripts
   postrotate
 /etc/init.d/syslog-ng reload  /dev/null 21 || true
   endscript
 }

 I thought create will do this but it doesn't work and my logs getting
 bigger and bigger.
 What did I do wron?

 Regards

 Jakob
   

The command touch should work.  Not sure on the permissions though.

Dale

:-)  :-)
-- 
[EMAIL PROTECTED] mailing list



[gentoo-user] logrotate won't rotate portage logs

2007-01-15 Thread Mick

Hi All,

I do not understand why the log files within /var/log/portage/ will
not rotate on my PC, while they rotate fine on my laptop.  The
/etc/logrotate.conf is the same on both boxen:
==
# rotate log files weekly
weekly
#daily

# keep 4 weeks worth of backlogs
rotate 4

# create new (empty) log files after rotating old ones
create

# uncomment this if you want your log files compressed
compress

# packages can drop log rotation information into this directory
include /etc/logrotate.d

notifempty
nomail
noolddir

[snip . . . ]

# when /var/log/portage gets big
/var/log/portage/*.log
{
   rotate 1
   weekly
   nocreate
   ifempty
   olddir /var/log/portage/old
   postrotate
find /var/log/portage/old -maxdepth 1 -mtime +30 -exec /bin/rm -f {} \;
   endscript
   nocompress
}
==

The only difference I noticed (other than the fact that I have two
year old portage log files in /var/log/portage) between the two boxen
is that the access rights of the 'old'  directory on the PC were:

drwxr-sr-x 2 rootroot  48 Dec 23  2005 old

while on the laptop which rotates without problems are:

drwx-- 2 rootroot  4256 Jan 13  11:20 old

This may be a bit of a red herring because even though I changed the
access rights as per the laptop, the PC still refuses to rotate the
portage log files.

Any ideas?  How do I troubleshoot this one?
--
Regards,
Mick
--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] logrotate

2005-08-04 Thread Richard Fish

Uwe Thiem wrote:


On 03 August 2005 12:11, Etaoin Shrdlu wrote:
 


On Wednesday 03 August 2005 12:54, Uwe Thiem wrote:
   


Hi folks,

from /etc/logrotate.conf:

-
# no packages own lastlog or wtmp -- we'll rotate them here
/var/log/wtmp {
   monthly
   create 0664 root utmp
   rotate 1
}
-

It states it rotates lastlog (/var/log/lastlog) but it doesn't and my
lastlog grows forever. Doesn't seem right. Anybody else seeing the
same or have I messed up?
 


Probably missing something (I don't use logrotate), but seems to me that
the above fragment only deals with /var/log/wtmp. To
have /var/log/lastlog rotated, add another section for it.
   



Are you sure you aren't using it? Have you looked into /etc/cron.daily?

 



Why is lastlog growing forever???  Doesn't that only track the most 
recent logins by userid?  It seems to me that file should only grow if 
you add users.


And Etaoin is correct, that block only rotates /var/log/wtmp.  The 
comment is misleading/wrong.


-Richard

--
gentoo-user@gentoo.org mailing list



[gentoo-user] logrotate

2005-08-03 Thread Uwe Thiem
Hi folks,

from /etc/logrotate.conf:

-
# no packages own lastlog or wtmp -- we'll rotate them here
/var/log/wtmp {
monthly
create 0664 root utmp
rotate 1
}
-

It states it rotates lastlog (/var/log/lastlog) but it doesn't and my lastlog 
grows forever. Doesn't seem right. Anybody else seeing the same or have I 
messed up?

I mean I can easily edit /etc/logrotate.conf but I think it should do that by 
default.

Uwe

-- 
95% of all programmers rate themselves among the top 5% of all software 
developers. - Linus Torvalds

http://www.uwix.iway.na (last updated: 20.06.2004)
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] logrotate

2005-08-03 Thread Etaoin Shrdlu
On Wednesday 03 August 2005 12:54, Uwe Thiem wrote:

 Hi folks,

 from /etc/logrotate.conf:

 -
 # no packages own lastlog or wtmp -- we'll rotate them here
 /var/log/wtmp {
 monthly
 create 0664 root utmp
 rotate 1
 }
 -

 It states it rotates lastlog (/var/log/lastlog) but it doesn't and my
 lastlog grows forever. Doesn't seem right. Anybody else seeing the
 same or have I messed up?

Probably missing something (I don't use logrotate), but seems to me that 
the above fragment only deals with /var/log/wtmp. To 
have /var/log/lastlog rotated, add another section for it.
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] logrotate

2005-08-03 Thread Uwe Thiem
On 03 August 2005 12:11, Etaoin Shrdlu wrote:
 On Wednesday 03 August 2005 12:54, Uwe Thiem wrote:
  Hi folks,
 
  from /etc/logrotate.conf:
 
  -
  # no packages own lastlog or wtmp -- we'll rotate them here
  /var/log/wtmp {
  monthly
  create 0664 root utmp
  rotate 1
  }
  -
 
  It states it rotates lastlog (/var/log/lastlog) but it doesn't and my
  lastlog grows forever. Doesn't seem right. Anybody else seeing the
  same or have I messed up?

 Probably missing something (I don't use logrotate), but seems to me that
 the above fragment only deals with /var/log/wtmp. To
 have /var/log/lastlog rotated, add another section for it.

Are you sure you aren't using it? Have you looked into /etc/cron.daily?

Uwe

-- 
95% of all programmers rate themselves among the top 5% of all software 
developers. - Linus Torvalds

http://www.uwix.iway.na (last updated: 20.06.2004)
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] logrotate

2005-08-03 Thread Etaoin Shrdlu
On Wednesday 03 August 2005 16:10, Uwe Thiem wrote:

 Are you sure you aren't using it? Have you looked into
 /etc/cron.daily?

Yes, I'm sure. 

# emerge -s logrotate

*  app-admin/logrotate
  Latest version available: 3.7.1-r1
  Latest version installed: [ Not Installed ]
  Size of downloaded files: 31 kB
  Homepage:http://www.gentoo.org
  Description: Rotates, compresses, and mails system logs
  License: GPL-2

# ls /etc/cron.daily/
slocate  syslog.cron

where syslog.cron is _not_ part of logrotate, but is instead a script (I 
suppose it comes with sysklogd, but I'm not sure) whose purpose, as the 
name says, is to rotate syslog's files. 
Following the comments in it, I modified it to rotate all the files 
in /var/log (it's easy, here are the instructions:

# sysklogd  Cron script to rotate system log files daily.
#
#   If you want to rotate other logfiles daily, edit
#   this script.  An easy way is to add them manually
#   or to add -a to syslogd-listfiles and add some grep
#   stuff
#
#   Written by Martin Schulze [EMAIL PROTECTED].
)

This does the job for me, without the need to use the real logrotate 
app.
-- 
gentoo-user@gentoo.org mailing list