We have a server which hostname is powernas with samba 3.0.9 that exports file system to web server client linux (portal5) release 2.6.18-128.el5PAE #1 SMP Wed Dec 17 12:02:33 EST 2008 i686 i686 i386 GNU/Linux [oraias@portal5 cifs]$ smbclient -L \\powernas Password: Domain=[PRPM] OS=[Unix] Server=[Samba 3.0.9-1.3E.16] Sharename Type Comment --------- ---- ------- aplicacion Disk aplicacion para IAS But when we access via this URL : http://forms.prpmalaga.es/forms/frmservlet?config=PRP&form=PRPCONEXION.fmx it is case sensitive.It is mounted as cifs file system: //192.168.0.50/aplicacion /home/oracle/aplicacion/ cifs username=userias,password=clave_ias,uid=502,gid=500,rw 0 0 In others web servers it isn't case sensitive (it is mounted as smbfs file system)and the same URL works ok: //192.168.0.50/aplicacion /home/oracle/aplicacion/ smbfs username=userias,password=clave_ias 0 0
Can you try cifs mount with option nocase?
Can you list (ls or ls -l) files under /home/oracle/aplicacion/ ? Or can you cat (cat /home/oracle/aplicacion/) one of the mixed case files without going via URL? What is the version of cifs client that you are using (modinfo cifs)
There is a difference in the way cifs and smbfs are used. Can you use mount a share using cifs without specifying uid and gid because it looks like a share is mounted using smbfs without uid and gid. Is the file PRPCONEXION.fmx under /home/oracle/aplicacion/ ? You may want to generate a wireshark trace when you try to access the url and attach it here, that would help to see what fails.
(In reply to comment #3) > There is a difference in the way cifs and smbfs are used. > Can you use mount a share using cifs without specifying uid and gid > because it looks like a share is mounted using smbfs without uid and gid. > Is the file PRPCONEXION.fmx under /home/oracle/aplicacion/ ? > You may want to generate a wireshark trace when you try to access the url > and attach it here, that would help to see what fails. I don't understand what do you mean about gid and uid, because these are the user and group of the files.
(In reply to comment #2) > Can you list (ls or ls -l) files under /home/oracle/aplicacion/ ? > Or can you cat (cat /home/oracle/aplicacion/) one of the mixed case files > without going via URL? > What is the version of cifs client that you are using (modinfo cifs) The problem isn’t with linux commands that with nocase works ok , it’s with URL(with prpconexion.fmx in lower case doesn’t work) ---
One more question, does file PRPCONEXION.fmx reside on the share mounted using cifs filesytem (i.e either under /home/oracle/aplicacion on the client machine or under aplicacion on the server machine)? I am still not sure what is the connection between cifs share and the URL and why this is a cifs client's problem!
(In reply to comment #6) > One more question, does file PRPCONEXION.fmx reside on the share mounted > using cifs filesytem (i.e either under /home/oracle/aplicacion on the client > machine or under aplicacion on the server machine)? > I am still not sure what is the connection between cifs share and the URL > and why this is a cifs client's problem! Yes, /home/oracle/aplicacion is on the client machine and is mounted using cifs file system, and the problem is with any URL; the URL must be writing in the same way that is writing in the file system.
If you disable unix extension, do you still have problems accessing the file PRPCONEXION.fmx? Can you list the file PRPCONEXION.fmx or prpconexion.fmx using ls command after you mount that particular Samba share using cifs with nocase mount option?
what I do not understand is, how is it possible to cat a file in a case insensitive way (since cifs mount is used with option nocase) but the .fmx file can't be accessed in a case insensitive way which presumably exists on the same cifs mounted share!
With linux command we don't have problems with upper/lower case, the problem is only with any URL by example: http://forms.prpmalaga/Index.php in this case you must write the URL in the same way that is writing in the file system.
OK, there must be a difference when a http protocol tries to access a file and ls -l tries to access a file. Would be useful if you can generate and attach two wireshark traces, 1 accessing a file as you do when you access it in an URL 2 accessing that same file via command line like ls -l <mount_path>/file_name (as used in the URL) Will do some debugging on my side as well.
In case of mount option nocase, cifs vfs client as it should, sets the field Case Sensitivity: Path names are caseless as 1 in the flag field of the smb header and does not set that field in case mount option nocase is not specified. I do not think cifs vfs client can do much beyond that. The onus is on the server (e.g. Samba) after that to handle such requests.
Can you, 1. load cifs module 2. disable unix extensions (echo 0 > /proc/fs/cifs/LinuxExtensionsEnabled) 3. mount a cifs share with nocase option and then see whether you can access a file in a case insensitive way? With POSIX semantics, it overrides Case Sensitivity
Created attachment 5337 [details] patch to indicase server about file names case sensitivity Include Case Sensitivity flag in smb header's flag field in case of mount with nocase option.
This patch is necessary but inspite of this patch, Samba server still fails a NT Create AndX request for a case insensitive file with an error object_not_found.
This is the error I see on Samba server (the file name on server is File2) [2010/02/12 13:50:49, 5] smbd/open.c:1525(open_file_ntcreate) open_file_ntcreate: FILE_OPEN requested for file file2 and file doesn't exist. [2010/02/12 13:50:49, 5] smbd/files.c:407(file_free) freed files structure 9535 (0 used) [2010/02/12 13:50:49, 10] smbd/open.c:3131(create_file_unixpath) create_file_unixpath: NT_STATUS_OBJECT_NAME_NOT_FOUND
Assuming that you've inspected the packets and verified that the case insensitive bit is set, you might want to try setting "case sensitive = no" in smb.conf. If that makes it work, then maybe there's something wrong in the case autonegotiation code server side?
I do have that option, "case sensitive = no" in smb.conf. The error happens (object not found) inspite of that. And case sensitivity bit is set in smb header's Flag field during requsts such as NT Create AndX (to open a file) such as Tree Connect. With the patch I posted, Case Sensitivity bit is set during Tree Connect but that is probably not necessary i.e. the that patch is not needed to overcome this problem.