[Samba] smbmount case sensitivity problem

Urban Widmark urban at teststation.com
Sat Mar 9 03:55:02 GMT 2002


On Fri, 8 Mar 2002, jerry drake wrote:

> When I use smbmount on the Linux side, even with "preserve case" turned
> on, I run into problems when case is a factor. For example:
> 
> > bash-2.05$ smbmount //spiro/homes-unix foo
> > Password: 
> > bash-2.05$ cd foo
> > bash-2.05$ mkdir Abc
> > bash-2.05$ mkdir abc
> > mkdir: cannot create directory `abc': File exists
> 
> or I can see a directory "Abc" and "rmdir abc" and it will remove "Abc".
> And so on.

Linux smbfs defaults to running in case-insensitive mode. When you create
Abc a "dentry" is created in the kernel with this name. When you try to
create abc, the smbfs code is asked to look if there is a dentry with this
name and since it is case-insensitive it says "yes" (and mkdir errors).

As I understand it this is also how a windows client would react, abc and
Abc are the same name. If you are using windows machines these names are
probably going to cause trouble, if you are not using windows clients you
may want to consider using nfs instead.

You could try adding -o case to your smbmount command. I don't expect that
to work too well as it is an almost untested setting.


> The weird thing is that the exact same share from Solaris does not
> exhibit this problem when we do the identical thing from a Red Hat
> 7.1 machine using samba 2.0.7. I've searched in the Red Hat knowledge

The difference for smbfs when using samba 2.0.7 and 2.2.1a is probably
something in how smbmount negotiates with the server.

Or it could be the different kernels used (different smbfs code).

Get a copy of the latest version of ethereal and get a trace of the
network traffic. See how the negotiation differs, what other requests
differ including the mkdir request.

/Urban





More information about the samba mailing list