[Samba] how to get Windows to notice unix-based delete command (inotify)

Jeremy Allison jra at samba.org
Tue May 27 03:56:33 GMT 2008


On Tue, May 27, 2008 at 02:01:38PM +1200, Jason Haar wrote:
> Hi there
>
> We have a Samba-based "upload server" where people put files to be  
> processed. Anyway, when they upload files, a Unix-based script runs and  
> moves the files off. However, the Windows explorer app doesn't "notice"  
> the removal, and the user still sees the files. If they F5/refresh  
> explorer, the files indeed have disappeared. If I have two explorer  
> windows open from two different Windows hosts on the same Samba dir, and  
> create a file on one, it shows up within 1-2 seconds on the other -  
> which is good.
>
> Obviously this is an inotify/dnotify issue, so I guess my question is,  
> how can I change the Unix script so that Samba is able to "tell" the  
> connected client that a file change has occurred, so that it refreshes  
> the content?
>
> This is under CentOS-4.6 with Samba-3.0.28a/3.0.29, and "kernel change  
> notify = Yes"

With kernel based dnotify you shouldn't have to do anything,
the smbd should get signalled once the file is gone causing
it to notify the client.

Unfortunately there's no debug messages in the kernel
inotify handler (that's an oversight, I'll add one once
I'm back at work tomorrow). Can you add one (in the
function inotify_handler() in smbd/notify_inotify.c and
see if it gets triggered appropriately ?

Jeremy.


More information about the samba mailing list