When serving files containing special characters such as "()?:" in the filename through Samba, the names get transformed into an unrecognizable format. For example, a file

my_file:_(important).txt

is displayed as

M43J1E~0.TXT

Is there a way to avoid this behavior (without renaming the files, obviously)? I'm assuming that character encoding is not to blame because several UTF-8 characters seem to work fine.

link|improve this question
Samba version 2:3.4.0-3ubuntu5.5 on Ubuntu 9.10 – Matti Mar 20 '10 at 22:55
Adding "mangled names = no" to smb.conf solved this (thanks, Dennis Williamson). – Matti Mar 23 '10 at 0:25
feedback

1 Answer

Windows does not allow some characters in filenames that Unix does allow. Samba "mangles" the filenames to make them comply with Windows restrictions. You can check the file /etc/smb.conf or /etc/samba/smb.conf to see what settings are in place. To show those settings plus the defaults, use this command:

testparm -vs | less

To narrow that down a bit:

testparm -vs|grep "case\|mangl"

See this page for more information. Also, see about half way down this page (the same information as the previous link).

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.