[Samba] Samba logging behavior on new files

Bala balamurugana at yahoo.com
Thu Mar 29 13:03:19 GMT 2007


Hi list,

I have home made program, which uses File Alteration Monitor library
to watch samba log files for new file creation in samba share
directory.

This technique works fine when I use GNU/Linux machine as client and
it fails when I use Windows machine as client.  The cause of failure
is, samba server creates different pattern of logs and sometimes it
does not create log entries on new file creation.

New file creation is done by copying file to share directory after
mounting it.

Log configuration of samba server is
        log file = /var/log/samba/%U.log
        log level = 2

Below is log entries when GNU/Linux is used.

[2007/03/20 18:01:18, 2] smbd/open.c:open_file(245)
  b2bc1ir opened file outbox/echoserver read=Yes write=Yes (numopen=1)
[2007/03/20 18:01:18, 2] smbd/reply.c:reply_mknew(1324)
  new file outbox/echoserver
[2007/03/20 18:01:18, 2] smbd/close.c:close_normal_file(270)
  b2bc1ir closed file outbox/echoserver (numopen=0)

Below is log entries when Windows is used.

[2007/03/25 21:48:53, 2] smbd/open.c:open_file(245)
  b2bc1ir opened file outbox/test.txt read=No write=Yes (numopen=2)
[2007/03/25 21:48:53, 2] smbd/close.c:close_normal_file(270)
  b2bc1ir closed file outbox/test.txt (numopen=1)
[2007/03/25 21:48:54, 2] smbd/open.c:open_file(245)
  b2bc1ir opened file outbox/test.txt read=Yes write=No (numopen=2)
[2007/03/25 21:48:54, 2] smbd/close.c:close_normal_file(270)
  b2bc1ir closed file outbox/test.txt (numopen=1)
[2007/03/25 21:48:54, 2] smbd/open.c:open_file(245)
  b2bc1ir opened file outbox/test.txt read=Yes write=No (numopen=2)
[2007/03/25 22:00:07, 2] smbd/open.c:open_file(245)


I use CentOS v4.4 and Samba version 3.0.10-1.4E.9

What could be wrong in my setup?

Please advice,

Thanks in advance,

Bala



 
____________________________________________________________________________________
Now that's room service!  Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097


More information about the samba mailing list