Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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:

http://msdn.microsoft.com/en-us/library/jj216044.aspx

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.

share|improve this question
add comment

1 Answer 1

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.

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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