Monday, April 4, 2011

How the MySQL Monitor Agent broke Sendmail

For MySQL Enterprise Monitor an agent is required. I've downloaded from which contains mysqlmonitoragent-

When I was testing the email alerting for my backup script I got an error:
/etc/mail/ line 544: fileclass: cannot open '/etc/mail/trusted-users': Group
writable directory

Luckily RPM was able to tell me that mysqlmonitoragent had set / to the wrong permissions.
# rpm -qf /
# rpm -qvl mysqlmonitoragent- | head -1
drwxrwxr-x    2 root    root                0 Nov 25 01:51 /
# rpm -qvl filesystem-2.4.0-3.el5 | head -1
drwxr-xr-x    2 root    root                0 Oct  1  2009 /
# echo test | mail -s test
# /etc/mail/ line 544: fileclass: cannot open '/etc/mail/trusted-users': Group
writable directory

I've filed Bug #60752 for this. So watch out for this bug if you're using mysqlmonitoragent RPM's!

The work-around is to do a "chmod 755 /".

1 comment:

  1. Thanks for catching this and filing a bug--sorry about that! Meanwhile, the agent installer (binary) should work as documented. I hope you don't find any other gotchas, but if you do, please let us know. -Gary