Comment 17 for bug 60448

Revision history for this message
Matt Zimmerman (mdz) wrote : Re: [Bug 60448] Re: .xsession_errors file grows out of control & saturates disk space

On Tue, Oct 31, 2006 at 07:05:15PM -0000, manu wrote:
> Why not create a logrotate config file such as
> /etc/logrotate.d/xsession_errors with the following configuration:
>
> "/home/*/.xsession_errors"
> {
> rotate 1
> size 500k
> copytruncate
> missingok
> compress
> }
>
> It will check the file size daily and create one compressed copy
> whenever the file exceeds 500k, then remove the oldest copy and truncate
> .xsession_errors. to zero size.
>
> I mean, why reinventing the wheel when we already have such a tool like
> logrotate.

logrotate is designed for rotating system logs; it is not appropriate for it
to attempt to traverse user home directories. Likely problems:

- Security vulnerabilities
- NFS-mounted home directories
- Huge numbers of home directories

etc.

--
 - mdz