Samba caching directory handles? (Writes to incorrect home dir)

James Sutherland jas88 at cam.ac.uk
Tue May 15 14:10:31 GMT 2001


On Tue, 15 May 2001, Andrew Bartlett wrote:
> James Sutherland wrote:

> > It isn't resumed, it's been retained from the previous session.
>
> The vuid is dead at this point, as the user has logged out, and this has
> been recorded in utmp/wtmp.  The only way to a valid vuid is with a
> username and password, and on generation of that vuid the utmp/wtmp
> entires are again updated.  Correct?  (Similarly for PAM session
> modules).

There's certainly something strange going on, but remember smbd runs as
the connected user: a Samba bug alone couldn't produce the behaviour
you've described, AIUI.

> > Hrm. Yes, that's a little different from the symptoms cited as reasons
> > never to use \\server\homes - but since this "feature" doesn't work
> > anyway, it isn't thoroughly understood :-)
>
> The feature is quite simple, the code in reply.c simply places
> 'username' in the place of 'homes' and recalls the function,

Yes - the trouble is, doing so breaks Windows...

> it only gets interesting when windows starts making assumptions.

We KNOW that Windows makes these assumptions, and that it causes
problems similar (but not identical) to the ones you describe...

> In any case, I don't think the bug lies here.

There may be another, related, bug coming into play here, but Samba alone
can't cause the symptoms as described.

Can you reproduce these problems, and get an "ls -l" of the files in
question? In particular, what are the ownership, permissions and
timestamps set to? If the files are NOT owned by the owner of that
directory, and the directory is 0700, you seem to have an OS problem; if a
file ~foo/bar is being created by user bar, I'd suspect this is another
version of the original \homes share problem.

Also try a netstat - see if there's a connection left "lying around" after
a user has logged out from Windows?


James.
-- 
"Our attitude with TCP/IP is, `Hey, we'll do it, but don't make a big
system, because we can't fix it if it breaks -- nobody can.'"

"TCP/IP is OK if you've got a little informal club, and it doesn't make
any difference if it takes a while to fix it."
		-- Ken Olson, in Digital News, 1988





More information about the samba-technical mailing list