[Samba] Wrong charset on NTFS volumes (ext4 works fine)

Daniel Carrasco Marín d.carrasco at ttu.es
Tue Nov 18 11:27:02 MST 2014


El 18/11/14 a las 19:05, Jeremy Allison escribió:
> On Tue, Nov 18, 2014 at 06:39:55PM +0100, Daniel Carrasco Marín wrote:
>> El 18/11/14 a las 18:25, Jeremy Allison escribió:
>>> On Tue, Nov 18, 2014 at 12:19:31PM +0100, Daniel Carrasco Marín wrote:
>>>> Hi, first of all i'm sorry for my english.
>>>>
>>>> I've a little problem with samba 3.6.6 and NTFS volume. I've mounted
>>>> an USB drive in NTFS format on my server, and all works fine
>>>> (characters are OK, i can create folders with accents or ñ like
>>>> "camión", "muñeca"...), but when i try to share that drive through
>>>> samba, all special characters look wrong and i can't create any
>>>> folder with that characters...
>>>> I've a lot of shared folders in ext4 and all works fine, so i think
>>>> that the problem is NTFS system.
>>>>
>>>> I've tried some options like "dos charset", "unix charset" and
>>>> "display charset", mounting that drive with "ntfs-3g -o
>>>> iocharset=utf8", CP850... but nothing works.
>>>>
>>>> Someone knows how to fix this?
>>> Doesn't seem like a Samba specific problem.
>>>
>>> What locale is set on your shell when
>>> you do an 'ls' and see correct names ?
>> The ls command looks fine, all characters are OK when i list files
>> or folders, even i can create files/folders with that characters
>> without problem. The problem is when i share that files/folders
>> through samba.
>> In locale i've all in "es_ES.UTF-8".
> Then you need to look at debug logs. Samba should
> be using the same iconv code that 'ls' is using
> internally.
Thanks for reply, i've changed the log to debug and I've seen that and 
filename looks fine:
pc007.old:  smbd_dirptr_get_entry mask=[*] found _!-UNIDAD 
H/__EIA-CAM-Planes-Urbanisticos-Inf-Publica/2014/140728 - PE Tratamiento 
Afino ETAP - Gri*ñ*on fname=140728 - PE Tratamiento Afino ETAP - 
Gri*ñ*on (140728 - PE Tratamiento Afino ETAP - Gri*ñ*on)

I've tried to create a folder too, but here's where the filename looks 
wrong too:
check_reduced_name: couldn't get realpath for _!-UNIDAD 
H/__EIA-CAM-Planes-Urbanisticos-Inf-Publica/2014/carpeta sin t*�*tulo

Why characters are wrong in share?, because it happen in linux and 
Windows explorers...

-- 
------------------------------------------------------------
Daniel Carrasco Marín
  
Técnicas Territoriales y Urbanas, S.L.
C/ Zurbano 92, 2º, 28003 Madrid
Tfno.: +34 91 571 93 46 (ext. 148) # Fax: +34 91 571 58 72
------------------------------------------------------------



More information about the samba mailing list