Problems exist with listing directories using case insensitive names over SMB2 or above. I have a folder called 'Desktop' in a share called Public on my Samba server running on Ubuntu. Using SMB3, trying to list the directory fails if I use the case-insensitive name. psmedley@XPS13:~$ smbclient //192.168.1.200/Public -mSMB3 -d 10 --username=psmedley -N 2> smbclient.log Anonymous login successful smb: \> smb: \> ls desktop NT_STATUS_NO_SUCH_FILE listing \desktop smb: \> ls Desktop Desktop D 0 Mon Jul 20 13:51:45 2015 -1366264008 blocks of size 1024. -1997689408 blocks available smb: \> exit Using SMB1, running ls with the case-insensitive name works fine. psmedley@XPS13:~$ smbclient //192.168.1.200/Public -d 10 --username=psmedley -N 2> smbclient.log Anonymous login successful smb: \> ls desktop Desktop D 0 Mon Jul 20 13:51:45 2015 65535 blocks of size 33553920. 65535 blocks available This occurs with 'case sensitive' set to auto or no in smb.conf I see the same behaviour with Samba 4.2.3 built on OS/2.
I just tested with -mSMB2 and it seems to work OK, so perhaps it's just a problem with SMB3?
Also tested with 4.3.0rc2 on linux and same behaviour
Can you get us: 1. A capture of the on-the-wire behavior, and 2. A level 10 log of the activity on the server for that client?
Created attachment 11333 [details] wireshark logs of port 139 & 445 I've never used wireshark before, but I've attempted to capture traffic over ports 139 and 445. The client commands were: smbclient //192.168.1.200/Public -mSMB3 --username=psmedley -N 'cd desktop' smbclient returned: cd \desktop\: NT_STATUS_OBJECT_NAME_NOT_FOUND
Created attachment 11334 [details] server side log with debug level 10 Server side logs attached as requested
Created attachment 11336 [details] server side log with debug level 10 for client PC
I tested from a Windows 7 command line, and things seem to work OK. I'm assuming that Windows 7 would be connecting via SMB >= 2 by default. Would server side / wireshark logs from Windows 7 be of any assistance?
Looks like a SMB2 create request is always case-sensitive, ignoring the smb.conf setting. Have to do more code digging to find out how to fix this.
Created attachment 11929 [details] possible patch Can you give this patch a try?
Hi Christian, apologies for the delay. Correct me if I'm wrong, this appears to be a server side patch? Changing this file doesn't result in any changes for smbclient.
Created attachment 12054 [details] proposed patch Hi Paul, correct, this is a server side patch. There is nothing wrong about the behavior of smbclient. In the meanwhile, I have prepared a better patch that also covers the rename scenario. Are you able to try it out?
@Lewis - are you able to try a build with this patch on your OpenSuse install? If not, I'll try get it built here
(In reply to Paul Smedley from comment #12) I finally got my build box back up and running (after a bumpy upgrade from 13.2 to Leap 42.1). I should be able to look at building this sometime this week. I did think that I saw this same behavior when connecting to a Windows share, so I am skeptical that this is *all* of the fix for this particular condition, but let's start here, as Christian was kind enough to provide the patch.
Created attachment 12064 [details] git-am fix for 4.4.next, 4.3.next.
(In reply to Jeremy Allison from comment #14) Why not add the patch with the test as well?
(In reply to Christian Ambach from comment #15) Doesn't cleanly apply as the test env has changed. If you want to back-port it I'll review, but it's not necessary for the fix.
Hi Karolin, please pick for 4.3.x and 4.4.x.
(In reply to Christian Ambach from comment #17) Pushed to autobuild-v4-[3|4]-test.
(In reply to Karolin Seeger from comment #18) Pushed to both branches. Closing out bug report. Thanks!