I'm trying to monitor a remote Windows Share for changes (the server can be an actual Windows machine or a Linux machine with Samba server). AFAIK the SMB protocol supports a kind of event-based notification:


And I can find it implemented server-side in Samba in the change_notify option in smb.conf.

My question is: how can I watch for such events from the client side from a Linux machine? I'd like to setup something that works in a fashion similar to inotifywait and be notified with an event when the content of files on the share changes, or when files are created, deleted or moved.


an idea is to use Inotify on linux to monitor changing on filesystem.

As SAMBA 3.0.23 (http://wiki.samba.org/index.php/Samba_3.0_Features_added/changed), the protocol now support Inotify, server site, to notify compatible client of filesystem changing.

But, as https://lkml.org/lkml/2007/4/7/129, seems that actually CIFS client does not support correctly Inotify.

  • 2
    It was my first idea, but in fact it doesn't work. I've already verified inotify does not receive events for remote Samba changes. – Alan Franzoni May 8 '13 at 10:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.