[Samba] Unwanted case sensitivity

Kevin Keane subscription at kkeane.com
Wed Feb 17 19:27:25 MST 2010


First of all, Windows actually is case sensitive, too (at least on NTFS, not on FAT). You can actually create C:\tmp\foo and C:\tmp\Foo at the same time, just not in Explorer (or though most standard Windows APIs).

Secondly, even with case sensitive = No , Samba is not truly case insensitive (neither is Windows). Samba is case PRESERVING. File names do have case, Samba simply prevents creating files that differ only in case.

The case insensitivity is primarily implemented on the client side. And that's probably why you see the phenomenon: ls is built into bash (or whatever shell you are using). Sum isn't. Also, my guess is that sum /XXXX.SMB/aaabbb/fre?.txt will work as well - because the wildcard is expanded by your shell before handing it to sum.

What you could do to solve this on the Linux side:

sum $(ls /XXXX.SMB/AAAbbb/Fred.txt)

That takes advantage of bash's understanding of case insensitivity even for other programs that don't natively understand it.

> -----Original Message-----
> From: samba-bounces at lists.samba.org [mailto:samba-
> bounces at lists.samba.org] On Behalf Of Jim Ramsey
> Sent: Wednesday, February 17, 2010 2:55 PM
> To: samba at lists.samba.org
> Subject: [Samba] Unwanted case sensitivity
> 
> I have also posted this on IRC.
> 
> I have a linux host running stock RHEL 5.4 Samba 3.0.33-3.15. The host
> acts
> both as a Samba server and does a CIFS mount of that same share. The
> reason for doing this is so that programs running on the Linux host
> have
> the same case insensitive view as the Windows clients.
> 
> I have nocase set in the relevant line in /etc/fstab
> I have case sensitive = No set in the smb.conf.
> 
> Still I get case sensitive responses though odd ones.
> 
> Example:
> 	The native Linux directory that is share is named /srv/XXXX.
> 	There would be a directory /srv/XXXX/AAAbbb which contains
> 	a file Fred.txt.
> 	The directory, /srv/XXXX, is shared as XXXX. The Linux host
> 	CIFS mounts it as //localhost/XXXX on /XXXX.SMB.
> 	Generally, everyone accesses Fred.txt through /XXXX.SMB/AAAbbb.
> 	Nobody accesses it through /srv/XXXX.
> 
> 	Here's where things get strange
> 	ls -l /XXXX.SMB/AAAbbb/Fred.txt and all variations works!
> 	but
> 	sum /XXXX.SMB/AAAbbb/Fred.txt only works if you get the
> 	case just right.
> 
> Any ideas?
> 
> Regards,
> 
> Jim Ramsey
> 
> 
> 
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba


More information about the samba mailing list