Volker Lendecke
2016-Jan-22 06:02 UTC
[Samba] Notification of file modification in subdirectories not working
On Thu, Jan 21, 2016 at 04:57:34AM -0800, ivenhov wrote:> Hi > > Does anyone had similar issues in the past? > I still cannot find reason why notification of file modification of files in > subdirs is not visible on client machinesSomeone needs to send network traces and debug level 10 logs for this. And try to reproduce the same against a Windows server. Volker -- SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen phone: +49-551-370000-0, fax: +49-551-370000-9 AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen http://www.sernet.de, mailto:kontakt at sernet.de
ivenhov
2016-Jan-25 15:24 UTC
[Samba] Notification of file modification in subdirectories not working
Hi Volker Thanks for reply. managed to capture Samba logs 4.2.7 in debug 10 Subsribed to events on path /watchfolder recursively. First notification is renaming a folder in a subfolder, path /watchfolder/test/renamed - that works OK. Second notification is on path /watchfolder/test/subfile.txt and editing that in Notepad on another Windows 7 machine via UNC path That does not show notification. Attached filtered pcap Wireshark file from machine subscribing to events Let me know if you need anything else. Daniel On 22 January 2016 at 07:19, Volker Lendecke [via Samba] < ml-node+s2283325n4697188h90 at n4.nabble.com> wrote:> On Thu, Jan 21, 2016 at 04:57:34AM -0800, ivenhov wrote: > > Hi > > > > Does anyone had similar issues in the past? > > I still cannot find reason why notification of file modification of > files in > > subdirs is not visible on client machines > > Someone needs to send network traces and debug level 10 logs > for this. And try to reproduce the same against a Windows > server. > > Volker > > -- > SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen > phone: +49-551-370000-0, fax: +49-551-370000-9 > AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen > http://www.sernet.de, mailto:[hidden email] > <http:///user/SendEmail.jtp?type=node&node=4697188&i=0> > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://samba.2283325.n4.nabble.com/Notification-of-file-modification-in-subdirectories-not-working-tp4696991p4697188.html > To unsubscribe from Notification of file modification in subdirectories > not working, click here > <http://samba.2283325.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4696991&code=aXdhbi5kYW5pZWxAZ21haWwuY29tfDQ2OTY5OTF8LTYxNzE4NjQwNw==> > . > NAML > <http://samba.2283325.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> >log.smbd-sanit.txt.zip (558K) <http://samba.2283325.n4.nabble.com/attachment/4697311/0/log.smbd-sanit.txt.zip> notification-failed.pcapng (4K) <http://samba.2283325.n4.nabble.com/attachment/4697311/1/notification-failed.pcapng> -- View this message in context: http://samba.2283325.n4.nabble.com/Notification-of-file-modification-in-subdirectories-not-working-tp4696991p4697311.html Sent from the Samba - General mailing list archive at Nabble.com.
Daniel Iwan
2016-Jan-26 13:08 UTC
[Samba] Notification of file modification in subdirectories not working
I have output of another test with exactly the same behaviour This time I have pcap files from Samba and client PC. CHange to the file subfile.txt was made on another PC Looks like Samba sees change to the file but does not send it as a notification [2016/01/26 10:09:15.590689, 10, pid=12027, effective(1001, 1006), real(1001, 0)] ../source3/smbd/notify_internal.c:615(notify_trigger) notify_trigger called action=0x3, filter=0x0, path=/home/matr/localshare/watchfolder/test/subfile.txt [2016/01/26 10:09:15.590760, 10, pid=12027, effective(1001, 1006), real(1001, 0)] ../source3/smbd/notify_internal.c:710(notify_trigger_local) notify_trigger_local called for /home/matr/localshare/watchfolder/test/subfile.txt, path_len=40, filter=0 [2016/01/26 10:09:15.590800, 10, pid=12027, effective(1001, 1006), real(1001, 0)] ../source3/smbd/notify_internal.c:735(notify_trigger_local) recursive = true pathlen=40 (/) [2016/01/26 10:09:15.590816, 1, pid=12027, effective(1001, 1006), real(1001, 0)] ../librpc/ndr/ndr.c:402(ndr_print_debug) e: struct notify_db_entry server: struct server_id pid : 0x0000000000002ee9 (12009) task_id : 0x00000000 (0) vnn : 0xffffffff (4294967295) unique_id : 0x185e4f32ed71900d (1755927984871673869) filter : 0x00000000 (0) subdir_filter : 0x00000013 (19) private_data : 0x7f39b5941770 [2016/01/26 10:09:15.590903, 10, pid=12027, effective(1001, 1006), real(1001, 0)] ../source3/smbd/smb2_server.c:2597(smbd_smb2_request_done_ex) smbd_smb2_request_done_ex: idx[1] status[NT_STATUS_OK] body[2] dyn[no:0] at ../source3/smbd/smb2_setinfo.c:154 [2016/01/26 10:09:15.590924, 10, pid=12027, effective(1001, 1006), real(1001, 0)] ../source3/smbd/smb2_server.c:898(smb2_set_operation_credit) smb2_set_operation_credit: requested 1, charge 1, granted 1, current possible/max 482/512, total granted/max/low/range 31/8192/73/31 [2016/01/26 10:09:15.591007, 10, pid=12027, effective(1001, 1006), real(1001, 0)] ../source3/smbd/notify_inotify.c:128(inotify_dispatch) inotify_dispatch called with mask=4, name=[subfile.txt] [2016/01/26 10:09:15.591029, 10, pid=12027, effective(1001, 1006), real(1001, 0)] ../source3/smbd/notify_inotify.c:160(inotify_dispatch) inotify_dispatch: ne.action = 3, ne.path = subfile.txt [2016/01/26 10:09:15.591042, 10, pid=12027, effective(1001, 1006), real(1001, 0)] ../source3/smbd/notify_inotify.c:78(filter_match) filter_match: e->mask=4, w->mask=210003c6, w->filter=17 [2016/01/26 10:09:15.591056, 10, pid=12027, effective(1001, 1006), real(1001, 0)] ../source3/smbd/notify.c:256(sys_notify_callback) sys_notify_callback called for watchfolder/test [2016/01/26 10:09:15.591083, 1, pid=12027, effective(1001, 1006), real(1001, 0)] ../librpc/ndr/ndr.c:402(ndr_print_debug) &m: struct FILE_NOTIFY_INFORMATION NextEntryOffset : 0x00000000 (0) Action : FILE_ACTION_MODIFIED (3) FileNameLength : 0x00000016 (22) FileName1 : 'subfile.txt' _pad : DATA_BLOB length=0 [2016/01/26 10:09:15.591154, 10, pid=12027, effective(1001, 1006), real(1001, 0)] ../source3/smbd/notify.c:194(notify_marshall_changes) Client only wanted 32 bytes, trying to marshall 36 bytes This could be he reason. I don't know why max_param would be changed as it is initially set to 8kB There is something that looks like change to the max_param bit earlier [2016/01/26 10:09:07.131430, 10, pid=12027, effective(1001, 1006), real(1001, 0)] ../source3/smbd/smb2_notify.c:230(smbd_smb2_notify_send) smbd_smb2_notify_send: watchfolder/test - fnum 101760262 [2016/01/26 10:09:07.131448, 3, pid=12027, effective(1001, 1006), real(1001, 0)] ../source3/smbd/smb2_notify.c:250(smbd_smb2_notify_send) smbd_smb2_notify_send: notify change called on watchfolder/test, filter FILE_NAME|DIR_NAME|ATTRIBUTES|LAST_WRITE, recursive = 0 [2016/01/26 10:09:07.131470, 10, pid=12027, effective(1001, 1006), real(1001, 0)] ../source3/smbd/notify_inotify.c:382(inotify_watch) inotify_add_watch for /home/matr/localshare/watchfolder/test mask 210003c6 returned wd 3 [2016/01/26 10:09:07.131484, 10, pid=12027, effective(1001, 1006), real(1001, 0)] ../source3/smbd/notify.c:334(change_notify_add_request) change_notify_add_request: Adding request for watchfolder/test: max_param = 32 But I could not cross-referenced it with any SMB message. Regards D. On 25 January 2016 at 15:46, Daniel Iwan <iwan.daniel at gmail.com> wrote:> Hi Volker > Thanks for reply. > managed to capture Samba logs 4.2.7 in debug 10 > > Subsribed to events on path /watchfolder recursively. > First notification is renaming a folder in a subfolder, path > /watchfolder/test/renamed - that works OK. > Second notification is on path /watchfolder/test/subfile.txt and editing > that in Notepad on another Windows 7 machine via UNC path > That does not show notification. > Attached filtered pcap Wireshark file from machine subscribing to events > > Let me know if you need anything else. > Daniel > > > > > > > > > > On 22 January 2016 at 07:19, Volker Lendecke [via Samba] < > ml-node+s2283325n4697188h90 at n4.nabble.com> wrote: > >> On Thu, Jan 21, 2016 at 04:57:34AM -0800, ivenhov wrote: >> > Hi >> > >> > Does anyone had similar issues in the past? >> > I still cannot find reason why notification of file modification of >> files in >> > subdirs is not visible on client machines >> >> Someone needs to send network traces and debug level 10 logs >> for this. And try to reproduce the same against a Windows >> server. >> >> Volker >> >> -- >> SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen >> phone: +49-551-370000-0, fax: +49-551-370000-9 >> AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen >> http://www.sernet.de, mailto:[hidden email] >> <http:///user/SendEmail.jtp?type=node&node=4697188&i=0> >> >> -- >> To unsubscribe from this list go to the following URL and read the >> instructions: https://lists.samba.org/mailman/options/samba >> >> >> ------------------------------ >> If you reply to this email, your message will be added to the discussion >> below: >> >> http://samba.2283325.n4.nabble.com/Notification-of-file-modification-in-subdirectories-not-working-tp4696991p4697188.html >> To unsubscribe from Notification of file modification in subdirectories >> not working, click here >> <http://samba.2283325.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4696991&code=aXdhbi5kYW5pZWxAZ21haWwuY29tfDQ2OTY5OTF8LTYxNzE4NjQwNw==> >> . >> NAML >> <http://samba.2283325.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> >> > >