[CentOS] Btmp and Wmtp log rotate

Bob Hoffman bob at bobhoffman.com
Fri Jun 12 15:57:57 UTC 2009


IN the /var/log/ folder there are two files

WTMP and BTMP

BTMP is getting huge after a year, about 800MB, WTMP is getting close to
1MB.

In the /etc/logrotate.conf I see this

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

I can see where WTMP will probably rotate at some point soon. However there
is nothing for BTMP.

I thought about doing the same thing for btmp however the permissions are
set at 0600 currently on the file. Will logrotate be able to rotate it at
0600 and if it creates at 0600 will it still work. Should I change to 0644
or 0664 (which would allow others to read the file?)

/var/log/btmp {
    monthly
    minsize 1M
    create 0664 root utmp
    rotate 1
}


I saw some fedora bugs on this and many were worried about the permissions
and had issues with the logrotate of this file due to it. No solution was
yet shown though they said it was fixed upstream.

My file is almost a gigabyte and I am thinking of just 'touching' it to
clear it.
Any imput, ideas, etc, would be cool.
Manually rotate it? Ideas?




More information about the CentOS mailing list