Apple AFP to SMB migration: Removing .AppleDouble and ._ files and converting file names from Unicode NFD to NFC

I recently wanted to reconfigure my NAS from Apple’s AFP (Apple Filing Protocol) to “regular” SMB (Samba), given that there appeared some non-Mac devices at home lately. :O I thought of it as a simple “turn off the one protocol and turn on the other one” reconfiguration, but after doing so, to my surprise, I discovered that some files went missing. The strange thing about it was that when looking at the same folder via SMB from my Raspberry Pi, the files were there and I could happily read them, but then looking at the same folder via AFP or SMBon my Mac, the files were gone. On the verge of going mad, I turned to a high-scale googling effort, trying to figure out what went wrong. The information out there was so sparse that I decided to document this nightmare of a network file system admin to hopefully save others a few grey hair…

Continue reading “Apple AFP to SMB migration: Removing .AppleDouble and ._ files and converting file names from Unicode NFD to NFC”