Auditing a dir in linux

Anju
Aug 17, 2021

--

Edit the file /etc/audit/rules.d/audit.rules:

-a exit,always -F path=/etc/<dir_name -F perm=warx -F key=dir-watch

Restart the service:

service auditd restart
#systemctl stop/start will not work

Check the audit:

ausearch -k dir-watch

--

--

Anju
Anju

Written by Anju

A DevOps engineer who loves automating everything (almost), exploring new places, and finding peace in nature. Always looking for the next adventure!

No responses yet