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

This is a discussion on [Samba] how to get Windows to notice unix-based delete command (inotify) - Samba ; 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 ...

+ Reply to Thread
Results 1 to 2 of 2

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

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

    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"

    Thanks!

    --
    Cheers

    Jason Haar
    Information Security Manager, Trimble Navigation Ltd.
    Phone: +64 3 9635 377 Fax: +64 3 9635 417
    PGP Fingerprint: 7A2E 0407 C9A6 CAF6 2B9F 8422 C063 5EBB FE1D 66D1

    --
    To unsubscribe from this list go to the following URL and read the
    instructions: https://lists.samba.org/mailman/listinfo/samba

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

    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.
    --
    To unsubscribe from this list go to the following URL and read the
    instructions: https://lists.samba.org/mailman/listinfo/samba

+ Reply to Thread