Windows – Files/Folders get weird names and become inaccessible on Samba share

Here is our current setup:

Mac OS X 10.5.8 File server using Mac OS Extended (Journaled) file system. There is a share that is shared over AFP (For Mac desktops) and Samba for (Windows desktops).

Here is what is happening:

All GFX designers use Mac and create folders/files on the file server over AFP and programmers access those files using samba. Sometimes files and folders appear with weird names and become inaccessible to those connecting over samba.

enter image description here

enter image description here

enter image description here

The only way to make the created folder accessible is go back onto a Mac desktop got to the location of the folder, create a new folder and move the contents of broken folder to the new one.

On the Mac desktops they can access the folders perfectly fine and the folder/file name appears as they were created. It’s just PC users accessing over Samba that has the file/folder issue. Whats weird is that this happens at random and I cannot find any reason why some files folder end up not working for samba users. I suspect that the mac users are doing something to that file/folder such as adding a flag or some property thats compatible with the Mac file system but causes problems with samba.

So my question:

 

What causes this issue? Is there a permanent fix? If not is there a way I can train the Mac uses to stop them causing the issues for samba users?

Solution:

It’s a file name mangling problem. Samba is converting filenames down to old style DOS 8.3 filenames.

Edit /etc/smb.conf (*) and add mangled names=no to the [global] section and restart the smb service.

Reference: http://oreilly.com/openbook/samba/book/ch05_04.html


(*) if the file is not there, type locate smb.conf to find it. Type sudo updatedb if locate does not find it and try again.