How would you monitor a directory on a Linux machine to check if there was a user (or someone from the network) who attempted to access it?
Asked
Active
Viewed 158 times
2 Answers
3
You can use auditd
(audit
) to monitor file access , after starting the service a log file will be registered under /var/log/audit/audit.log
To set a watch on a file, run :
sudo auditctl -w /path/to/file
To check it , run:
sudo ausearch -f /path/to/file
A detailled tuto can be found on Arch-linux-Wiki

GAD3R
- 66,769