For site security, Is it possible to real-time monitor file & folder’s chmod value once they got changed?

Is there methods/solutions like capturing and tracking code injection / malicious file modification event on the php files, so that email alert will be sent to administrator when chmod of default file is changed from 444 to other writable permissions(A prerequisite for file/folder modification) .

Testing Environment
ubuntu14.04 server
php5 + apache2
wordpress

Related posts

Leave a Reply

2 comments

  1. There is no such event in PHP but you can write script that will calculate hashes of all your files and check them after each execution (eg. via CRON).
    Same script could check files permissions.