Bug 485553 - logrotate breaks permission on /var/log/btmp
logrotate breaks permission on /var/log/btmp
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: logrotate (Show other bugs)
5.3
All Linux
medium Severity medium
: rc
: ---
Assigned To: Jan Kaluža
qe-baseos-daemons
:
: 700536 (view as bug list)
Depends On:
Blocks: 584039
  Show dependency treegraph
 
Reported: 2009-02-14 05:21 EST by Andrew C Aitchison
Modified: 2013-04-12 16:05 EDT (History)
8 users (show)

See Also:
Fixed In Version: logrotate-3.7.4-12
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 584039 (view as bug list)
Environment:
Last Closed: 2011-05-18 10:57:23 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Andrew C Aitchison 2009-02-14 05:21:58 EST
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 09:54:30 EDT
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 03:38:40 EDT
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 04:07:53 EDT
"But is there a way to read from a rotated btmp?"
Yes :
   lastb -f filename
Comment 5 Stefan Neufeind 2009-10-05 04:11:50 EDT
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 Product and Program Management 2009-11-06 14:25:20 EST
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-10 21:13:33 EST
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 10:57:23 EDT
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 04:25:44 EDT
*** 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.