0

I need to get alerted when a new directory or sub directory is created within the root directory that I am monitoring. The alert has to be triggered to a PHP file. How do I do this on CentOS? Is inotify the best route to take? I just need to know when a new directory is created and the location. So I am looking for the simplest of ideas to do this.

  • I have full control of the server
  • I just need to monitor creation of a directory
  • Alerts have to be sent to a PHP file (directly or indirectly)

Please send through any ideas you might have.

Pasta
  • 302
  • 1
  • 12

2 Answers2

2

If you add the EPEL repo to your CentOS host there is an "incron" package available which works with inotify to do what you're looking to do. Here's the docs: http://inotify.aiken.cz/?section=incron&page=doc&lang=en

cagenut
  • 4,848
  • 2
  • 24
  • 29
0

CentOS 6.3 has inotifywait built in.