Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detecting file opening in Linux

Tags:

python

file

linux

I'm writing a daemon, monitoring user activity on Linux. Is there any way to detect opening arbitrary file by arbitrary process? Preferred language is Python/C/C++

like image 519
Evgeny Vyalyy Avatar asked Mar 27 '26 20:03

Evgeny Vyalyy


1 Answers

Linux has group of inotify system calls.

There is a Python wrapper for these called pyinotify.

like image 97
vartec Avatar answered Mar 30 '26 10:03

vartec