Fwd: Pyinotify : which user ?

Roc Zhou chowroc.z+l at gmail.com
Thu Oct 18 12:51:47 EDT 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:
http://sourceforge.net/projects/crablfs

And the document is at:
http://crablfs.sourceforge.net/#ru_data_man

Thanks.

On 18 Oct 2007 16:00:24 GMT, Sébastien Weber <valereG at hotmail.fr> wrote:
>
> Hello,
>
> I'm actually writing an application with pyinotify which watchs a
> directory.
> 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,
>
> SW.
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20071019/f150bec0/attachment.html>


More information about the Python-list mailing list