Fwd: Pyinotify : which user ?
chowroc.z+l at gmail.com
Thu Oct 18 18:51:47 CEST 2007
---------- Forwarded message ----------
From: Roc Zhou <chowroc.z+l at gmail.com>
Date: Oct 19, 2007 12:48 AM
Subject: Re: Pyinotify : which user ?
To: Sébastien Weber <valereG at hotmail.fr>
The command lsof or fuser can report who is using the file, maybe you can
have a look at their source code, but they must be C code.
But since inotify is not absolute realtime, once the file is modified,
lsof or fuser can not return the right result.
I think it's better to use a good authentication method if you want to
use inotify this way, then you know when a user logged in and what
actions or commands he/she invoked, and record the inotify events with
timestamps. And a more careful permission strategy may be more sensible.
Or you can make use of SVN?
I'm also doing a project that makes use of pyinotify, one function of it
can be a "REPORT" as an IDS(Intrusion Detection System), and I reaches
several limitations of pyinotify, which you may be interested in.
The project is at:
And the document is at:
On 18 Oct 2007 16:00:24 GMT, Sébastien Weber <valereG at hotmail.fr> wrote:
> I'm actually writing an application with pyinotify which watchs a
> Pyinotify lets me know the events (access, modify, suppression, etc.) on
> and in the directory, but not the users who are responsable of them.
> Does someone know a library which could give me that information (who's
> using a file) ?
> Thank's in advance,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list