Filenames management error

Raúl Martínez rmartinez.zabala at sener.es
Fri May 24 07:38:02 GMT 2002


Hi. 

There may be a (very funny, instead) problem with filenames management 

Problem Description: 

- Long filenames with accents (specially if uc) cannot be retrieved from
the server DEPENDING ON THE EXISTENCE OF OTHER FILES WITH SIMILAR NAME
OR THE STORING ORDER. 


System Description: 

  Server: 
    Windows 2000 advanced server sharing a cluster resource. 

  Client: 
    SAMBA 2.2.4 running on Linux Mandrake 

Problem : 
  We were trying to build a mirror image in a Linux PC from the files on
a Windows 2000 server. 

  Those files are frequently very long file-named and contain accents. 

path: "/mnt/23le_com/P219112/Nuevas especificaciones/Pruebas Sistems" 

We've making some tests and configuration changes (even a SAMBA update)
to find out the problem cause, and those are our results: 


Test 0: 

The server says to have (and has): 
"RV  INTRODUCCIÓN DE PRECABLEADO DE REC.msg" (882 Kb) 

The client sees: 
"RV  INTRODUCCION DE PRECABLEADO DE REC.msg" (882 Kb) (unaccented) 

find . -type f -exec cksum "{}" \; 
cksum: ./RV  INTRODUCCION DE PRECABLEADO DE REC.msg: No existe el
fichero o el directorio 

(The system is unable to open the remote file) 



Test 1: 

We add a new empty (not specially important, I think), file with the
same name but the accent. 

"RV  INTRODUCCION DE PRECABLEADO DE REC.msg" (0 Kb) 
(Empty and Unaccented Test-file) 

The client sees: 
"RV  INTRODUCCION DE PRECABLEADO DE REC.msg" (882 Kb) (unaccented) 
"RV  INTRODUCCION DE PRECABLEADO DE REC.msg" (882 Kb) 
(Twice the same file) 

we run the find command again.... 
2276495018 903168 ./RV  INTRODUCCION DE PRECABLEADO DE REC.msg 
2276495018 903168 ./RV  INTRODUCCION DE PRECABLEADO DE REC.msg 

oops! (Now it has been able to find the accented file), but not the
other (the empty one). 


Test 2: 
We swapped both filenames to see what happens. 

First we can't rename the empty one because it's supposed to be opened,
but remember the file has never been read. 

We umounted the filesystem and tried again. 

4294967295 0 ./RV  INTRODUCCION DE PRECABLEADO DE REC.msg 
4294967295 0 ./RV  INTRODUCCION DE PRECABLEADO DE REC.msg 

oops again! (Now it has read the other file!). 


In our opinion, the client asks always for the unaccented file. It
causes, of course, the server not to retrieve the file except when
another one exists with the required name. 

In this case, the server retrieves THE ACCENTED ONE!, which seems to be
because is the first in its filesystem. 

Really funny. 

We are completely surprised and think it may be caused by some kind of
problem in the client filename management. 

Thank you for your attention. 


Raul Martinez Zabala. 

rmartinez.zabala at sener.es






More information about the samba-technical mailing list