Hostxpeed
Login Get Started →
Security

How to Monitor File Changes

4 min read
27 views
Jun 10, 2026

Using auditd

sudo auditctl -w /etc/passwd -p wa -k passwd_monitor
sudo auditctl -w /etc/group -p wa -k group_monitor
sudo auditctl -w /var/www -p rwxa -k web_files

View Change Logs

sudo ausearch -k passwd_monitor

Using inotify (Alternative)

sudo apt install inotify-tools
inotifywait -m -r -e modify,create,delete /etc/nginx

Was this article helpful?