logrotate complains about error: mixmaster:7 unknown option 'su' -- ignoring line

Bug #1120280 reported by Václav Haisman
36
This bug affects 7 people
Affects Status Importance Assigned to Milestone
mailman (Ubuntu)
Confirmed
Undecided
Unassigned
mixmaster (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

My daily cron mail contains this repeatedly:

/etc/cron.daily/logrotate:
error: mixmaster:7 unknown option 'su' -- ignoring line
error: mixmaster:7 unexpected text

Looking at /etc/logrotate.d/mixmaster shows this:

/var/log/mixmaster/err.log {
        weekly
        rotate 5
        compress
        missingok
        notifempty
        su root mixmaster
}

It looks like the "su root mixmaster" line is not valid.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mixmaster (Ubuntu):
status: New → Confirmed
Revision history for this message
Colin Tuckley (colint) wrote :

This appears to be a compatibility problem with logrotate.

The Debian wheezy version of logrotate appears to support this.

From the man page:

su user group
              Rotate log files set under this user and group instead of using default user/group (usually root).
              user specifies the user name used for rotation and group specifies the group used for rotation.

Revision history for this message
James Teh (jteh) wrote :

I'm also seeing this with mailman:
/etc/cron.daily/logrotate:
error: mailman:2 unknown option 'su' -- ignoring line
error: mailman:2 unexpected text
error: mailman:16 unknown option 'su' -- ignoring line
error: mailman:16 unexpected text
error: mailman:30 unknown option 'su' -- ignoring line
error: mailman:30 unexpected text
error: mailman:44 unknown option 'su' -- ignoring line
error: mailman:44 unexpected text
error: mailman:58 unknown option 'su' -- ignoring line
error: mailman:58 unexpected text

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mailman (Ubuntu):
status: New → Confirmed
Revision history for this message
Thomas Sisson (thomas-sisson-1) wrote :

This is an obvious hack and not a true patch. Instead su should behave as expected and be exactly like the Debian version.

In my opinion, we should not divert from Debian on commands and scripts unless it is necessary. This can generally be applied to inherent differences in directory structure, interface changes, and security issues. Why reinvent the wheel?

I simply commented out the offending line and added the comment, "Works in Debian, but not Ubuntu."
Then I duplicated the line, replacing mixmaster with root.

I am not a programmer. I have not tested this.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.