Bug 485553 - logrotate breaks permission on /var/log/btmp
Summary: logrotate breaks permission on /var/log/btmp
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: logrotate
Version: 5.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Jan Kaluža
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
: 700536 (view as bug list)
Depends On:
Blocks: 584039
TreeView+ depends on / blocked
 
Reported: 2009-02-14 10:21 UTC by Andrew C Aitchison
Modified: 2013-04-12 20:05 UTC (History)
8 users (show)

Fixed In Version: logrotate-3.7.4-12
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 584039 (view as bug list)
Environment:
Last Closed: 2011-05-18 14:57:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
a patch: config file entry for btmp (497 bytes, patch)
2009-05-25 13:54 UTC, Daniel Novotny
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0816 0 normal SHIPPED_LIVE logrotate bug fix update 2011-05-18 14:57:14 UTC

Description Andrew C Aitchison 2009-02-14 10:21:58 UTC
Description of problem:
Bug 156900 fixed a permission problem with /var/log/btmp which caused sshd to
complain "Excess permission or bad ownership on file /var/log/btmp"

Unfortunately logrotate restores the bad permission if/when it rotates the log


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. allow /var/log/btmp to grow old and big enough to be rotated
2. run logrotate
  
Actual results:
permissions of /var/log/btmp change from 0600 to 0664

Expected results:
permissions of /var/log/btmp remain 0600

Additional info:

Comment 2 Daniel Novotny 2009-05-25 13:54:30 UTC
Created attachment 345312 [details]
a patch: config file entry for btmp

the logrotate config file entry for btmp should contain "create 0600 root utmp"

it seems there's no btmp entry in the package's default config file at all, so I can add it with this line included

Comment 3 Stefan Neufeind 2009-10-05 07:38:40 UTC
Looks okay imho. But is there a way to read from a rotated btmp? I mean, it is binary ...

Comment 4 Andrew C Aitchison 2009-10-05 08:07:53 UTC
"But is there a way to read from a rotated btmp?"
Yes :
   lastb -f filename

Comment 5 Stefan Neufeind 2009-10-05 08:11:50 UTC
Whoops, sorry. Well, them I'm also for including btmp in the rotates as well. Above mentioned patch should be fine imho

Comment 6 RHEL Program Management 2009-11-06 19:25:20 UTC
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".

Comment 7 Paul Wouters 2010-03-11 02:13:33 UTC
Please be sure to add a btmp entry into logrotate.conf. On modern networks, the btmp files gets to over a GB in size within a year. It totally hosed our rsync backup with hardlinks solution. Because it changes every day due to the ssh probes, rsync has to replay the entire file taking up lots of disk space for one pretty useless file that needs no more then a month of logs.

Comment 16 errata-xmlrpc 2011-05-18 14:57:23 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0816.html

Comment 17 Jan Kaluža 2012-05-15 08:25:44 UTC
*** Bug 700536 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.