[Samba] Question about Case Insensitivity

Kenneth Stailey kstailey at yahoo.com
Tue Oct 24 15:57:05 GMT 2006


I am trying to make a Linux filesystem appear case-insensitive and I got the
idea that I could use a SAMBA loopback mount to do this.  I almost succeeded on
my first try but I ran into a snag I have no answer for yet.

My setup involves sharing filesystem "/a" and then mounting it on "/b".  I can
use "ls -l" on the "/b" filesystem in a case-insensitive fashion but when I go
to open the file by a case-insensitive name the attempt fails.

Can someone please explain why I am not able to open() files with case
insensitive names even though stat() or lstat() works with them?

These examples illustrate my issue:

Case sensitive ext3 filesystem:

# ls -l /a/AbCd/EFgh
-rw-r--r-- 1 root root 6 Oct 24 10:18 /a/AbCd/EFgh
# ls -l /a/abcd/efgh
ls: /a/abcd/efgh: No such file or directory

Case insensitive mount.cifs mount of SAMBA shared "/a" filesystems:

# ls -l /b/AbCd/EFgh
-rw-r--r-- 1 root root 6 Oct 24 10:18 /b/AbCd/EFgh
# ls -l /b/abcd/efgh
-rw-r--r-- 1 root root 6 Oct 24 10:18 /b/abcd/efgh

But why doesn't open(2) work in a case insenstive fashion?

# cat /b/AbCd/EFgh
# cat /b/abcd/efgh
cat: /b/abcd/efgh: No such file or directory

======== Details ========

System is KNOPPIX 5.0.1 - June 2006

# uname -a
Linux Knoppix 2.6.17 #4 SMP PREEMPT Wed May 10 13:53:45 CEST 2006 i686

Mount was performed like this:

mount -t cifs //localhost/public /b -o nocase

This minimal smb.conf is being used:

# cat /etc/samba/smb.conf
        security = share
        guest account = knoppix
        netbios name = TEST1
        socket options = TCP_NODELAY IPTOS_LOWDELAY
        workgroup = WORKGROUP

        guest ok = yes
        guest only = yes
        path = /a
        read only = no

More information about the samba mailing list