Comment 3 for bug 1024001

Revision history for this message
Roman Vynar (roman-vynar) wrote : Re: pmp-check-file-privs does not throw crit/warn on dir permissions

It's not a good idea to warn/crit in case of permissions problem because this is an issue with the user permissions with which you call the script, e.g. nagios user, but not with mysql itself or its bad file permissions.
So the proper way is to provide a descriptive error message and UNK code in case of any problem when looking for files not owned by mysql user.

E.g.
[root@centos6 ~]# sudo -u nagios ./nagios/bin/pmp-check-mysql-file-privs
UNK find: `/var/lib/mysql/cacti': Permission denied find: `/var/lib/mysql/mysql': Permission denied find: `/var/lib/mysql/performance_schema': Permission denied find: `/var/lib/mysql/percona': Permission denied

instead of silent exit.