14

Does Linux record who last changed a file (rather than created it)? If so, how do I find this out? If not, is there some way of monitoring file(s)?

Umber Ferrule
  • 481
  • 2
  • 6
  • 12

3 Answers3

14

See who made changes to a file

Install the audit package using the package manager for your distribution and start the service.

Set a watch for a file you're interested in, such as /etc/passwd

# auditctl -w /etc/passwd -p war -k password-file

See the audit records for that file

# ausearch -f /etc/passwd | less
Dennis Williamson
  • 62,149
  • 16
  • 116
  • 151
1

Generally, no. I've never tried it, but if you want to track users accessing particular file, you can take a look at audit

kolbusa
  • 71
  • 3
0

No, there's no record keeping of who modified which file.

To give you an idea, you might check the logs to see who was logged in at that time, and under ideal circumstances, history files can examined.

Matt Simmons
  • 20,396
  • 10
  • 68
  • 116