Jika sebelumnya Anda belum mengaktifkan semacam audit, tidak ada alat yang dapat melaporkan ini setelah file dimodifikasi. Anda bisa mendapatkan tanggal dan waktu kapan file terakhir diubah, tetapi bukan riwayat revisi.
Ke depan, Anda dapat menginstal, mengatur, mengaktifkan auditd
kemasan.
Dari auditctl
halaman manual:
-w path
Insert a watch for the file system object at path. You cannot insert
a watch to the top level directory. This is prohibited by the kernel.
Wildcards are not supported either and will generate a warning. The way
that watches work is by tracking the inode internally. If you place a
watch on a file, its the same as using the -F path option on a
syscall rule. If you place a watch on a directory, its the same as using
the -F dir option on a syscall rule. The -w form of writing watches
is for backwards compatibility and the syscall based form is more
expressive. Unlike most syscall auditing rules, watches do not impact
performance based on the number of rules sent to the kernel. The only
valid options when using a watch are the -p and -k. If you need to
anything fancy like audit a specific user accessing a file, then use
the syscall auditing form with the path or dir fields.
Ada diskusi lebih lanjut tentang ini di pertanyaan Mencatat pembuatan file tersembunyi
Di sini beberapa diskusi untuk meretas dengan inotify untuk membuatnya memberi Anda PID dan UID.http://www.ioremap.net/node/55
Lihat juga Audithttp://andries.filmer.nl/kb/Monitoring-file-system-events-with-inotify,-incron-and-authctl/129#Audit
/etc/motd tidak ditampilkan ketika pipa bernama?
Apakah mungkin untuk mengubah file basis data kata sandi (/ etc/passwd) di linux?