Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

What's the best method for monitoring whether a file has been changed on a remote web servers given the following preconditions?

  • Servers are running different operating system but most are some flavor of Linux, a couple are running Windows Server.
  • SSH access isn't available on all servers.
  • The check is primarily to test that php templates used to generate pages, haven't been corrupted. The template doesn't change in size so the checksum of the file is always the same specifically replaced by an administrator.

So far I've only come up with the option of placing a file specifically on each server and then polling each of those files to retrieve diagnostic data. I have some concerns however about whether those file may themselves be compromised if they are in a public facing directory to require polling by an external source.

share|improve this question

5 Answers 5

Similar to tripwire, but OSSEC will watch for file modifications as well: http://www.ossec.net (this'll require a lightweight agent to be installed on the servers in question).

share|improve this answer

You can use monit tool to achive that. Below is the URL worth to give a try.

http://mmonit.com/monit/

share|improve this answer

I believe tripwire will do what you want. It can monitor a system for changes to files and send email alerts if the files change.

share|improve this answer

You may use nagios for that - basically it is easy to write Your own plugin to fire diff and check if there any differences against predefined, and write protected sample. Probably it is much more flexible than tripwire which basically works on checksum based tests, whilst nagios may works on what You need. Here is an example: http://blog.gnucom.cc/2010/check-file-for-changes-with-nagios/

share|improve this answer

in linux systems you can user innotify-tools. This tool is working on kernel level and can handle events like - create/delete/modified/ and others on files and directories.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.