From: John Drescher on
On Wed, May 5, 2010 at 4:56 PM, Darwin, Samuel <darwins(a)thirteen.org> wrote:
> We have a vendor who is going to install an application server, and it
> requires samba to behave as much like windows as possible.  There is a
> particular case they are complaining about.
>
>
> 1.  Run samba on redhat server
> 2.  Map a drive from windows.  Let's say the Z: drive
> 3.  Run a script to open and continuously modify a file on the samba
> share
> 4.  Observe the samba share in Windows Explorer
>
> You will see that the file size does not get updated until you hit
> "refresh".
> In a pure windows, environment, the filesize will be modified every few
> seconds.    So, samba is apparently not alerting the windows client that
> the filesize has changed.  Is this a configurable setting?  Can this be
> fixed?
>
> Here is an example perl script to run on the client side:
>
>
>
> open FILE, ">",  "Z:/test.txt";
>
>
>
> while (1) {
>
>        print FILE
> "jkasdklfjaskldfjaskl;dfjakl;sdfgjaklfghjkadfghajklsasdfjklasjdflkasjdfk
> lajsdfklajsdfl";
>
>       print FILE
> "jkasdklfjaskldfjaskl;dfjakl;sdfgjaklfghjkadfghajklsasdfjklasjdflkasjdfk
> lajsdfklajsdfl";
>
>       print FILE
> "jkasdklfjaskldfjaskl;dfjakl;sdfgjaklfghjkadfghajklsasdfjklasjdflkasjdfk
> lajsdfklajsdfl";
>
>            }
>
>
>
>        print "sleeping\n";
>
>        sleep 1;
>
>        }
>
>
>

I believe you need fam support compiled into samba and inotify support
in your kernel.

John
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
From: Darwin, Samuel on
I am using standard builds of CentOS 5.4 and Samba 3.5.2.

Inotify is in the kernel by default

Apparently the smb.conf setting "fam change notify = yes" represents the default value

gam_server is running

Is there something I have to "do", which is not done by default?



-----Original Message-----
From: John Drescher [mailto:drescherjm(a)gmail.com]
Sent: Thursday, May 06, 2010 11:46 AM
To: Darwin, Samuel
Cc: samba(a)lists.samba.org
Subject: Re: [Samba] non-windows behavior of samba

On Wed, May 5, 2010 at 4:56 PM, Darwin, Samuel <darwins(a)thirteen.org> wrote:
> We have a vendor who is going to install an application server, and it
> requires samba to behave as much like windows as possible.  There is a
> particular case they are complaining about.
>
>
> 1.  Run samba on redhat server
> 2.  Map a drive from windows.  Let's say the Z: drive
> 3.  Run a script to open and continuously modify a file on the samba
> share
> 4.  Observe the samba share in Windows Explorer
>
> You will see that the file size does not get updated until you hit
> "refresh".
> In a pure windows, environment, the filesize will be modified every few
> seconds.    So, samba is apparently not alerting the windows client that
> the filesize has changed.  Is this a configurable setting?  Can this be
> fixed?
>
> Here is an example perl script to run on the client side:
>
>
>
> open FILE, ">",  "Z:/test.txt";
>
>
>
> while (1) {
>
>        print FILE
> "jkasdklfjaskldfjaskl;dfjakl;sdfgjaklfghjkadfghajklsasdfjklasjdflkasjdfk
> lajsdfklajsdfl";
>
>       print FILE
> "jkasdklfjaskldfjaskl;dfjakl;sdfgjaklfghjkadfghajklsasdfjklasjdflkasjdfk
> lajsdfklajsdfl";
>
>       print FILE
> "jkasdklfjaskldfjaskl;dfjakl;sdfgjaklfghjkadfghajklsasdfjklasjdflkasjdfk
> lajsdfklajsdfl";
>
>            }
>
>
>
>        print "sleeping\n";
>
>        sleep 1;
>
>        }
>
>
>

I believe you need fam support compiled into samba and inotify support
in your kernel.

John
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
From: Darwin, Samuel on

By the way, I have isolated the problem to a subset of cases.

To review the problem case again briefly: mount Z: drive from Windows.
Actively modify a file. The Windows Explorer doesn't "update"
things like file size or modification date.

This is only broken when the modification happens across the samba
share.

If I log onto the Linux server that is running samba, and I modify a
file there (in any number of ways), the "update" actually does work. It
does show up on my Z: drive.

So, for the problem to occur, one must make the changes to the file from
Windows, across the samba share, as well as be observing the file from
Windows Explorer.






--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
From: Miguel Medalha on
That should really work. I have several Samba servers with Windows XP
clients and with all of them client-made changes are immediately
reflected in Windows Explorer.

> Apparently the smb.conf setting "fam change notify = yes" represents the default value
>

"fam change notify"? From version 3.0.025 on, that parameter was removed.

The parameters I have here are the ones documented in the smb.conf man page:

//|kernel change notify|/ = |yes|
///|change notify|/ = |yes|

/"Yes" is the default for both of them.

Nevertheless, I vaguely remember having met that problem once upon a time...
Did you try to recreate the share?

//
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
From: Roel van Meer on
Darwin, Samuel writes:

> So, for the problem to occur, one must make the changes to the file from
> Windows, across the samba share, as well as be observing the file from
> Windows Explorer.

We have encountered similar (bot not identical) problems and they were
solved by setting

csc policy = disable

for the particular share. Perhaps you could give that a try?

Regards,

roel

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