<div dir="ltr">Hi there,<br><div class="gmail_extra"><br><br><div class="gmail_quote">2013/2/22 Vishesh Handa <span dir="ltr"><<a href="mailto:me@vhanda.in" target="_blank">me@vhanda.in</a>></span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<br><br><div class="gmail_quote"><div><div class="h5">On Fri, Feb 22, 2013 at 11:47 PM, Simeon Bird <span dir="ltr"><<a href="mailto:bladud@gmail.com" target="_blank">bladud@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<div dir="ltr"><div>Hi Gabriel,<br><br></div><div class="gmail_extra"><div class="gmail_quote"><div>On 22 February 2013 08:55, Gabriel Poesia <span dir="ltr"><<a href="mailto:gabriel.poesia@gmail.com" target="_blank">gabriel.poesia@gmail.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>
- fanotify is completely silent regarding moves and deletes - it gives no clue something happened. It doesn't catch any other event related to the directories involved (file unlink, for example). Thus, it would need KDirNotify as a complement, which yes, only reports things done via kio.</div>



</div></blockquote><div><br></div></div><div>None at all? Not even a directory open? If using, eg, dolphin or other kio, will the directory reliably get opened (for listing) before a move takes place?<br><br></div></div>

</div></div></blockquote></div></div></div></blockquote><div><br></div><div>Unfortunately, not even a directory open. If I open the directory using Dolphin, I get a file open event in the directory and all its files. But nothing happens if I move a file :P</div>

<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="gmail_quote"><div><div class="h5">

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">

<div></div><div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">


<div>- The fanotify_init man page confirms that you need root privileges (specifically, the CAP_SYS_ADMIN capability), and says that this constraint might be relaxed in the future. But, at least currently, yes, we'd need a root daemon even to watch $HOME.</div>






<div>- I couldn't get the "directed" mode to work. This is the mode in which you would presumably only receive events from the directories you mark. It should just be a matter of changing a couple of parameters in fanotify_mark, but I didn't get it to work. If it really doesn't work, we'll need to manually filter global events (as I get here about 30 "open" events for /etc/passwd per second, for example).</div>



</div></blockquote><div><br></div></div><div>Ouch. Does filtering on event type work? ie, can you listen to just CLOSE_WRITE events? Also, is it not working, or is it just not working recursively?<br></div></div></div></div>

</blockquote></div></div></div></blockquote><div style><br></div><div style>Yes, filtering on even type works. And listening only to CLOSE_WRITE events filtered a large portion of the non-interesting accesses I was getting here. I hadn't tried that before. But the "directed mode" seems to not work at all. If I try to watch only a single directory, no matter if I list it, touch it, delete it or create a file in it, nothing happens. Maybe I'm just misusing it, but it should be so simple...</div>

<div style><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="gmail_quote"><div><div class="h5">

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">

<div></div><br></div><div class="gmail_quote">

I can see instances where a kDirWatch backend might work, if it can perform better than 1 million inotify watches - but I can't see it as a default, because a careless mv or rm would cause problems. <br></div></div></div>


</blockquote></div></div><div><br>Lets use the correct terminology - It's KDirNotify. KDirWatch is KDE's abstraction over inotify, dnotify, fam and others. We do not care about it cause it doesn't support move events.<br>


<br>KDirNotify is the dbus notification api which we care about.<br><br>----<br><br>Since fanotify requires root access, it really doesn't seem like a viable option.<br><br>How about we just stick with just inotify or inotify + kdirwatch? I know a stray move might remove stuff, but it does have significant advantages as well.<br>


<br></div></div></blockquote><div style><br></div><div style>Wait, KDirWatch or KDirNotify? hehe </div><div style><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div class="gmail_quote"><div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">

<div class="gmail_quote"><span><font color="#888888"><br>
</font></span></div><span><font color="#888888"><div class="gmail_quote">
Simeon<span class=""><font color="#888888"><br></font></span></div></font></span></div></div><span class=""><font color="#888888">
</font></span></blockquote></div><span class=""><font color="#888888"><br><br clear="all"><br>-- <br><span style="color:rgb(192,192,192)">Vishesh Handa</span><br>
</font></span></blockquote></div><br></div></div>