Comparison in Monit Permissions Testing
- by beanland
I'm trying to use Monit to check the permissions of a particular directory, but I only care that it's readable to all users. I don't care about any other permissions (write, execute) for the owner, group, or all. I also don't care about any special permissions.
Knowing that I can't change the permissions of this directory, and with the possibility of another administrator changing these permissions without affecting my processes that rely on this directory (i.e., granting or revoking write access to the group), is it possible to check for a minimum permission in Monit?
I have this which is currently working:
check directory archive path /var/home/archive/
if failed perm 0755 then alert
But I would like to have something like tihs:
check directory archive path /var/home/archive/
if failed perm > 444 then alert
This is failing for me. Is it possible to use comparison operators in Monit's permissions checking? If not, are there any workarounds?