[Samba] mangled filenames

Desmond Vicks dez at accid.net
Wed Jan 14 12:27:21 GMT 2009

Hi all,

I'm running Samba 3.0.31_1,1 on FreeBSD 7.0.

I have a problem where some files on the fileserver appear to have 
illegal characters in them and so look mangled-up when viewed over Samba.

Here's an example, listing files over Samba:

rococo% ls PR

ACD76Y~N    <-- Inhouse folder
AOBC8G~A    <-- Outhouse folder

Listing the same files directly on the fileserver with ls(1), the 
filenames appear ok (-w in ls(1) forces raw printing of non-printable 

baroque% ls -w PR


However, doing file(1) on the same directory shows some trailing spaces 
in the two folders that appear mangled-up over Samba:

baroque% file PR/*

PR/Archive:     directory
PR/Awards:      directory
PR/Inhouse :    directory    <-- notice the space before the colon
PR/Outhouse :   directory    <-- same here also

Has anyone seen anything like this before?  There's a few similar posts 
on the web, most notably [1], but they don't have any resolutions and as 
much as I can see, our filenames don't have any of the listed illegal 
characters in them.

What I'd really like to find out is if anyone can recommend any tools I 
can use to identify such illegal files and inspect this problem further?

Originally all of these files were copied from a Mac server with 
rsync(1) and we've had a few problems with this already (had to use 
'veto files' configuration directive etc).  If anyone has any tips or 
resources in general for using Samba with Mac clients, I'd love to hear 

1. http://tinyurl.com/8hfj58

Many thanks,


More information about the samba mailing list