Michael Carmack
2004-Apr-13 04:06 UTC
[Samba] Case-sensitivity problems with smbmount on linux
[This seems like it should be a FAQ, but I searched for quite some time without finding anything.] Mounting a samba share using smbmount under linux leads to problems when dealing with filenames that differ in case only. These problems do not affect WinXP mounting the same share, so it looks like a client issue. The server is running Samba 3.0.1 on linux, kernel 2.4.20. The relevant part of smb.conf looks like: case sensitive = yes preserve case = yes short preserve case = yes On the server I create two files, "test" and "TEST", as follows: karmak@server$ echo test > test karmak@server$ echo TEST > TEST Running some commands from the linux client, after mounting with smbmount/3.0.1 (kernel 2.4.25): karmak@client$ ls TEST test karmak@client$ cat TEST test karmak@client$ cat test test karmak@client$ mv test Test mv: overwrite `Test'? n It appears 'cat' can only see the lowercase file. Same for when you try to move the file. Instead of renaming, it thinks you want to overwrite the existing file. Other file utilities are affected in similar ways. I believe the server is properly configured, since under WinXP the behavior is as one would expect: > dir ............. TEST ............. test > type TEST TEST > type test test > move test Test ... > dir ............. TEST ............. Test I find this odd, because I would expect the Linux client to be at least as capable as the WinXP client in handling the case differences (if anything I'd expect the XP machine to be the one with the problems). Have I overlooked something? Thanks, Michael Carmack karmak@karmak.org
Michael Carmack
2004-Apr-18 01:56 UTC
[Samba] Case-sensitivity problems with smbmount on linux
Can anyone else confirm this problem so I know I'm not crazy? I've tried many different configuration options, but cannot get this working. In case my first post was too verbose, here's a quick way to see the problem. 1. Have 3 machines: Samba server, XP client, Linux client. 2. Mount shares (smbmount on Linux, "map network drive" on XP) 3. Create a file called "test" on the server. 4. Using the Linux cilent, do "mv test Test" (this fails). 5. Using the XP shell, do "move test Test" (this works). Bug? Feature? Misconfiguration? At this point I'd be happy with an "RTFM" reply, but which "M"? I've searched google and the mailing lists for hours, and cannot find a solution. Might not be typing in the right keywords though... Michael Carmack wrote:> > [This seems like it should be a FAQ, but I searched for quite some time > without finding anything.] > > Mounting a samba share using smbmount under linux leads to problems when > dealing with filenames that differ in case only. These problems do not > affect WinXP mounting the same share, so it looks like a client issue. > > The server is running Samba 3.0.1 on linux, kernel 2.4.20. The relevant > part of smb.conf looks like: > > case sensitive = yes > preserve case = yes > short preserve case = yes > > On the server I create two files, "test" and "TEST", as follows: > > karmak@server$ echo test > test > karmak@server$ echo TEST > TEST > > Running some commands from the linux client, after mounting with > smbmount/3.0.1 (kernel 2.4.25): > > karmak@client$ ls > TEST test > karmak@client$ cat TEST > test > karmak@client$ cat test > test > karmak@client$ mv test Test > mv: overwrite `Test'? n > > > It appears 'cat' can only see the lowercase file. Same for when you try > to move the file. Instead of renaming, it thinks you want to overwrite > the existing file. Other file utilities are affected in similar ways. > > I believe the server is properly configured, since under WinXP the > behavior is as one would expect: > > > dir > ............. TEST > ............. test > > type TEST > TEST > > type test > test > > move test Test > ... > > dir > ............. TEST > ............. Test > > I find this odd, because I would expect the Linux client to be at least > as capable as the WinXP client in handling the case differences (if > anything I'd expect the XP machine to be the one with the problems). > > Have I overlooked something? > > Thanks, > Michael Carmack > karmak@karmak.org > >-- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Jason Joines
2004-Sep-14 16:53 UTC
[Samba] Case-sensitivity problems with smbmount on linux
Michael Carmack wrote:> > Can anyone else confirm this problem so I know I'm not crazy? I've > tried many different configuration options, but cannot get this working. >Michael, I just experienced the exact same problem and ran across you post when searching for a solution. My server is running SuSE Linux 8.1 with Kernel 2.4.19 and Samba 2.2.8a. My client is SuSE Linux 9.1 with Kernel 2.6.5 and Samba client 3.0.4. I had folders on the smb share of our web server called phpScheduleIt (original extracted from tar) and phpscheduleit (live version). I made some changes in a file in phpscheduleit using vi on the server. Then I decided to open it up with Kate on my client via and smbmount. The changes were not reflected in the file I viewed with Kate. I made a change with Kate then viewed the file from the server and the changes were not reflected in vi. Then I saved the file to a new name with Kate and the file did not show up on the server with ls. I did a search on the server using find and found the newly created file was in phpScheduleIt and not phpscheduleit. Windows clients were working just find so I did an smbumount and remounted but still had the same problem. I then did an ls -lid via my client shell on the smbmount and it showed the two directories as having the same inode. I did the same on the server and they did not have the same inode. Then I used smbclient to connect to the share. If I typed "cd PHPSCHEDULEIT" or any other combination I ended up in phpScheduleIt. I decided to check the server. # testparm | grep case default case = lower case sensitive = No preserve case = Yes short preserve case = Yes mangle case = No I changed to "case sensitive = Yes" in smb.conf in the global section and retried the client. Now "cd PHPSCHEDULEIT" via smbclient failed as desired and "cd phpscheduleit" and "cd phpScheduleIt" took me where it was supposed. I remounted the share and ls -lid still showed the same inode for both folders. Also, "cd phpscheduleit" still took me to phpScheduleIt. I read that the "case sensitive" option was share specific so I moved it to the share definition and retried the cd operations at the shell over the smbmount. Now I am taken to phpscheduleit with both "cd phpscheduleit" and "cd phpScheduleIt". Problem confirmed! Jason Joines =================================