[Q] Mangled names problem with Samba, any help?

Hello, thats my problem:

For one of his functions my server create files with special characters as á, é, í, ó, ú, ñ, etc. very normal in my language (spanish)

To work with this files I acces to my server with Samba from Windows 7. The problem is that I see the files or folder with the name mangled and, if the are various it’s imposible to me identificate them. On linux the files appear perfectly.

In order to be able to see the files I have try to use the option “mangled names=No” which make my Samba show me correctly the name but, make them inaccesibles. For example if its a directory I can’t open him.

Can anyone help me to see the names correctly with samba been accesables?

Thanks,

So, not using Spanish I must ask if you can, from and within a Windows 7 system, create a file using these special characters properly? Have you considered using a NTFS partition, on the Linux side, to share files from Linux to a Windows 7 system? I assume if the files with these characters can be created on a NTFS partition from Linux, they can be sent to a NTFS drive on a Windows 7 system using SAMBA. Anyway, these are just some thoughts I had on the subject.

Thank You,

On 07/12/2012 12:46 AM, Jahegu wrote:
> Can anyone help me

i think you might be better off posting to the spanish list, here:
http://www.forosuse.org/forosuse/

NOT that you are not welcome here…and, not that you might not get a
great answer here…just that on the Spanish list you are very likely
to attract the attention of one who has been down this same path
before…(like a guy named Carlos…who could probably help you here
also, except maybe he doesn’t look in on Samba threads here unless they
also have “Spanish” in the subject…but, in the Spanish list he might)

i’m sure i can’t actually help because i always solve those problems by
never using non-ASCII characters in file/directory names…even though
i never try to pass them back and forth between Linux and windows…a
windows who is known to treat non-ASCII characters differently from
every other operating system on the planet.


dd

Thank you very much!

modify the system creating an NTFS partition for me aren’t an option because this HD is used for so many aplications and configurations and ext4 is the best for this.

Make the question in the spanish forum is something that I have already done. Normally I meka my questions in twice forums. The spanish forum is very good but normally I find so much information in this another and normally my quesions get a better solution here.

In this case the problem is done for the mangled names parameter of the samba server which probably affect also french, germanes, etc… and is for this why I thing here I have the posibility of find better help.

Thanks to everyone and I hope someone can help me

On 2012-07-12 17:36, Jahegu wrote:
>
> Thank you very much!
>
> modify the system creating an NTFS partition for me aren’t an option
> because this HD is used for so many aplications and configurations and
> ext4 is the best for this.

And it would not help. Samba access local drives via Linux filesytems,
which in turn does a conversion to access the non-native ntfs system; ie,
double conversion.

> Make the question in the spanish forum is something that I have already
> done. Normally I meka my questions in twice forums. The spanish forum is
> very good but normally I find so much information in this another and
> normally my quesions get a better solution here.

I don’t participate in the Spanish forum, and for a technical reason: I use
NNTP to access this forum, not via web. The Spanish forum doesn’t have a
gateway, so I can’t participate there.

DD meant the Spanish mail list. On the other hand, the English language
opensuse mail list has a bunch of samba experts.

> In this case the problem is done for the mangled names parameter of the
> samba server which probably affect also french, germanes, etc… and is
> for this why I thing here I have the posibility of find better help.

Yes, the problem would be the same for any language (except English), if
you use the UTF8 system. Cyrillic, Arabic, or worse, Chinese are different,
but even them I think they use UTF?

And recently we had a thread with a similar problem with a Swedish chap:

Re: How change from UTF-8 to ISO-8859
View this thread
here

I did experiments with a virtual W7 <–> Linux and names were transferred
just fine - so there must be something wrong with your config.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

On 2012-07-12 19:08, Carlos E. R. wrote:

> And recently we had a thread with a similar problem with a Swedish chap:
>
> Re: How change from UTF-8 to ISO-8859
> View this thread
> here

>
> I did experiments with a virtual W7 <–> Linux and names were transferred
> just fine - so there must be something wrong with your config.

(I would point again to that thread, there is a lot of information there.)

I got a PM from Jahegu, in Spanish. I’ll answer here because a PM is
inconvenient to me, using NNTP, and because others can comment - and he
gave me freedom in that respect. I will also add translations to Spanish
for his easier understanding.

He says that

> actualmente mi LOCALE es: LC_CTYPE=ca_ES.ISO-8859-1 todo lo demás en POSIX.

his locale is such, everything else is POSIX. Well, that’s precisely a
problem, it has to be UTF-8 (ca_ES.utf8 or ca_ES@euro) - “si o sí” (yes or
yes).

(tienes que usar locale ca_ES.utf8 or ca_ES@euro sí o sí)

Another problem he has is that names are truncated like “IA2OJT~9” - which
means that he is seeing the 8 bytes length names of FAT instead of VFAT.

(estás viendo los nombres cortos de 8 caracteres, como en msdos o FAT en
lugar de VFAT)

I don’t know the cause of this. I would like to see the /etc/samba/smb.conf
file. Post it using code tags:
Posting in Code
Tags - A Guide
, or if it is too long in susepaste.org

(no se porqué, pero quiero ver el contenido de ese fichero, dentro de “code
tags” (editor avanzado, botón # - y si es muy largo, en susepaste.org).

He is using “total commander” to access. I don’t know if that is related.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Thank you so much for your time,

this is my smb.conf file:


# smb.conf is the main Samba configuration file. You find a full commented
# version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the
# samba-doc package is installed.
# Date: 2010-07-05
[global]
        printcap name = cups
        cups options = raw
        map to guest = Bad User
        include = /etc/samba/dhcp.conf
        logon path = \\%L\profiles\.msprofile
        logon home = \\%L\%U\.9xprofile
        logon drive = P:
        usershare allow guests = Yes
        add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody -s /bin/false %m$
        domain master = No
        usershare max shares = 100
        netbios name = OpenSUSE
        passdb backend = smbpasswd
        wins support = No
        security = share
        workgroup = WORKGROUP
        dos charset = 850
        unix charset = iso-8859-1
        wins server =

[homes]
        comment = Home Directories
        valid users = %S, %D%w%S
        browseable = No
        read only = No
        inherit acls = Yes

[profiles]
        comment = Network Profiles Service
        path = %H
        read only = No
        store dos attributes = Yes
        create mask = 0600
        directory mask = 0700

[users]
        comment = All users
        path = /home
        read only = No
        inherit acls = Yes
        veto files = /aquota.user/groups/shares/

[groups]
        comment = All groups
        path = /home/groups
        read only = No
        inherit acls = Yes

[printers]
        comment = All Printers
        path = /var/tmp
        printable = Yes
        create mask = 0600
        browseable = No

[print$]
        comment = Printer Drivers
        path = /var/lib/samba/drivers
        write list = @ntadmin root
        force group = ntadmin
        create mask = 0664
        directory mask = 0775

[BACKUP]
        path = /home/jahegu/backup/
        guest ok = yes
        read only = no



I have more information:

the extension of the names of files/directorie isn’t a problem because I have names very longs which I see perfectly.
This files/folders are dowloaded with utorrent server for linux x64. The torrents are dowloaded to a system disk and once its totally downloaded the utserver move the download to another disk mounted in /mnt/
If I make a copy of a problem folder I have the same problem but whit other name.
If I rename the problematic folder changing the problematic character with the good, for example “ñ”, it apears relatively good (ex.: español -> español).
Before all this experiments I use ca_ES@euro, now I’m trying with ca_ES.utf8
There are many other folder with names londer than DOS system.
If I access to the system trow explorer I get the same results as from Total Commander.

Sorry if a can’t reply so fast as I like

and, again, thanks for your help.

On 2012-07-15 21:36, Jahegu wrote:
>
> Thank you so much for your time,
>
> this is my smb.conf file:

I would remove these two:


dos charset = 850
unix charset = iso-8859-1

You need to use UTF-8, which is the default - thus remove the lines.

> I have more information:
>
> the extension of the names of files/directorie isn’t a problem because
> I have names very longs which I see perfectly.
> This files/folders are dowloaded with utorrent server for linux x64.

Once each file is downloaded, make sure that the name is correct as seen from Linux, in a Linux
native filesystem. The names used on torrent might not be correct.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Hello,

I have removed the two lines and the result is the same

When I download the same torrent from W7 machine the name is displayed good.

The following I will try to do is look the temp files while download to view if are good name.

if you have another idea I will try it

thank you again for for dedication.

Now I have see that a file named “acción de gracias” appeard as “acci򬟤e gracias” and in another “español” as “espa?ol”. All from UI, in this case LXDE and from putty.

thanks,

On 07/18/2012 12:56 AM, Jahegu wrote:
>
> Now I have see that a file named “acción de gracias” appeard as
> “acci򬟤e gracias” and in another “español” as “espa?ol”. All
> from UI, in this case LXDE and from putty.

just to remind you that there are two very easy ways to avoid all of
this pain:

  1. avoid mixing Linux and Windows! MS does NOT want you or anyone to use
    anything other than Windows…EVER…they have the ability to follow
    the international standards on how to deal with letter characters! Linux
    can do it, Apple can do it, lots of cell phones with proprietary
    operating systems can do it…it is ONLY MS that uses a microsoft-only
    implementation of the standards…that makes in impossible to work
    together with other systems…here, why not instead of using all of this
    time to force Linux to work with windows, use the same time to force
    Windows to work with Linux–OR stop using windows.

  2. the other easy alternative i wrote in this thread earlier: “i always
    solve those problems by never using non-ASCII characters in
    file/directory names”

that is a simple, easy, quick workaround AND it keeps on working as
versions change, drivers change, operating systems are born and die, etc
etc etc…

ymmv


dd

Thanks for your response but I think for you it would be a solution but not for any other non-english language, and there are so much.
Now is a home problem but, if I use an solution with samba on an enterprise that need to use windows for users, it isn’t posible to make do the users not to use this chars. The diference on a word write with or without acentuation is really big and the wrong utilization or omision an big ortographic fault.

I don’t really think avoir the problem is the solution for an system. And I’m really sure that there is a funtional solution.

Anyway, as I said, thanks again!

On 2012-07-18 00:56, Jahegu wrote:
>
> Now I have see that a file named “acción de gracias” appeard as
> “acci򬟤e gracias” and in another “español” as “espa?ol”. All
> from UI, in this case LXDE and from putty.

Please forget torrent for the moment.

Just create a file, like “España_y_el_balón” in Linux, in the directory that is shared. Ensure
that all Linux tools see the correct name (specially a terminal like xterm).

Then go to Windows and check that the name is correct there, using Explorer.

Let’s concentrate on one problem at a time. :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

On 2012-07-19 15:18, Carlos E. R. wrote:
> Just create a file, like “España_y_el_balón” in Linux, in the directory that is shared. Ensure
> that all Linux tools see the correct name (specially a terminal like xterm).

I forgot to say that the shared folder has to be in a Linux native filesystem, like ext3, not
in a Windows filesystem like fat.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

No, I fogot to say, the filesystem of two HD (system & storage) are ext4

I made the file and all is ok, in linux ans windows show perfectly… what that is mean? :sarcastic:

thks

On 2012-07-19 16:46, Jahegu wrote:
>
> No, I fogot to say, the filesystem of two HD (system & storage) are ext4
>
> I made the file and all is ok, in linux ans windows show perfectly…
> what that is mean? :sarcastic:

Well, it means that Linux, Windows, and Samba are working correctly, as they should :slight_smile:

Now the problem is with torrent, or the people that deploy the files, or how you access those
files later.

I think that you should review the files as you get them, in Linux, and correct their names; it
is very possible that the files are not sent via torrent using UTF-8 names, so you have to
correct them one by one as they arrive. Once that is done, it should be stored correctly in
Linux and should be seen correctly in Windows as well.

If some tool you use does not see the correct name, that would be a different problem. In that
case, lets work again with the file “España_y_el_balón” you created earlier :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Thank you very much Carlos,

Now I understand where is the problem and I know an bit more of codification.

un saludo!

On 2012-07-25 23:36, Jahegu wrote:
>
> Thank you very much Carlos,
>
> Now I understand where is the problem and I know an bit more of
> codification.

Welcome!

> un saludo!

:slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)