[linux-cifs-client] using inotify with CIFS mounts - possible?

Tomasz Chmielewski mangoo at wpkg.org
Sun Apr 5 17:59:42 GMT 2009

Jeff Layton schrieb:
> On Sun, 05 Apr 2009 16:44:24 +0200
> Tomasz Chmielewski <mangoo at wpkg.org> wrote:
>> Is it somehow possible to use inotify with CIFS mounts (mount.cifs to a 
>> Windows 2003 server), to monitor when new files are created?
>> With mount.cifs from Samba 3.3.2, I tried to use inotifywait (while 
>> creating new files on Windows), but it didn't show anything.
>> If it's not possible, are there any alternatives to achieve such a thing 
>> from Linux?
> Currently, no this isn't possible with CIFS. The VFS hooks to allow a
> filesystem to set up extra notfications were removed recently. The only
> "user" of them was CIFS and it never worked properly anyway. The kernel
> interface for this had serious problems too.

Thanks for the info, at least I won't be looking blindly and it means 
I'd have to implement this on the Windows machine then.

A bit off topic here - does anyone know a Windows tool similar to 
"inotifywait"? I.e. if I traced changes to /tmp/1/ directory and created 
"some_file" file, I would see such output:

/tmp/1/ CREATE some_file
/tmp/1/ OPEN some_file
/tmp/1/ MODIFY some_file
/tmp/1/ MODIFY some_file
/tmp/1/ MODIFY some_file
/tmp/1/ CLOSE_WRITE,CLOSE some_file

I know Windows has something called "Directory Change Notifications", 
but I didn't find a tool like "inotifywait" which could be used in scripts.

Tomasz Chmielewski

More information about the linux-cifs-client mailing list