[Samba] Samba and .NET FileSystemWatcher

Keith Douglas keith.douglas at slidepath.com
Thu Jun 16 07:59:20 MDT 2011

Hi All, 


I've been looking into a problem using the .NET FileSystemWatcher class
in a VB application. The application is only receiving notifications for
events in the root of the directory it is watching. E.g. When monitoring
\\SambaServer\Files <file:///\\SambaServer\Files>
\\SambaServer\Files\file.txt <file:///\\SambaServer\Files\file.txt>
will give notifications but not \\SambaServer\Files\Folder\file2.txt via

The same application works fine using a windows CIFS/SMB share or a
local drive. 

The FileSystemWatcher.IncludeSubdirectories option is set to True in the


The issue appears to be that Samba does not monitoring file events
recursively, because inotify in the linux kernel does not monitor
directories recursively.


>From man inotify;

"Inotify  monitoring  of directories is not recursive: to monitor
subdirectories under a directory, additional watches must be created."
I was wondering if there is any method by which Samba can notify for
recursive events? 
I am aware that this could also be achieved by adding individual watches
within the afore-mentioned VB application, however this is not an option
for me at present.
Any help or advice appreciated.

More information about the samba mailing list