Thanks Bill! I was curious about Vernon's original request and had poked at using FILE params for DIR. Quickly discovered that wasn't going to work so just commented out DIR and gave FILE a go, by itself. FILE worked and I didn't look back. Deciphering which of the foo's flips to red should not be troublesome for most. Thanks for the clarification.
Also, I test this on 4.3.17 - on the server, with the server as a client. Aside from the usual /full/path/to/foo perms/ownership, if Vernon has a RedHat variant system selinux might need a tweak.
Regards,
Tim
From: Xymon [xymon-bounces at xymon.com] on behalf of Bill Arlofski [waa-hobbitml at revpol.com] Sent: Tuesday, December 2, 2014 5:08 PM To: xymon at xymon.com Subject: Re: [Xymon] Monitoring Directory Permissions
On 12/02/2014 06:25 PM, Tim McCloskey wrote:
I just tested this using file instead of dir. It works for UNIX (everything is a file), can't speak for windows. I'm not sure that it is designed or intended to work this way and I doubt you can mix DIR and FILE for the same O/S directory.
analysis.cfg
DIR /foo SIZE<8192 SIZE>4096 COLOR=yellow
FILE /foo MODE=0644 COLOR=RED TRACK FILE /foo OWNERID=johndoe COLOR=yellow
Hi Tim,
just thought I would respond to your doubts:
"I doubt you can mix DIR and FILE for the same O/S directory."
It turns out, that was actual the test I did.
I was already monitoring a dir for size on a host and just added:
file:/foo (client-local.cfg)
and
FILE /foo MODE=777 yellow (analysis.cfg)
and it worked fine.
Only thing is, on the "files" test page for that host, there are two lines for /foo:
/foo /foo /other/file/name
With no indication as to which one is for which test... but when one goes nongreen, the reason stated below it makes it clear.
Hope that helps!
Bill
-- Bill Arlofski Reverse Polarity, LLC http://www.revpol.com/ -- Not responsible for anything below this line --
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon