Filename issues with SMB shares Mac to NAS with rsync
I posted this in the support forms. dlavigne suggested I open a bug. I have tried all the solutions in the forum. Debug attached.
Issue is only with SMB shares. NFS is fine. Remote rsync is fine.
rsync -a --iconv=utf-8-mac,utf-8 localdir/ mynas:remotedir/ does not solve this.
So I am trying to switch from mixed NFS and SMB to all SMB. I have a share called music, which is shared via NFS and SMB. When I run an rsync from my Mac local disk via NFS everything is happy. When I try to run it on the same share (but shared via SMB) I get a bunch of file has vanished errors, for example:
file has vanished: "/Volumes/music/Afro Cuban All Stars/A Toda Cuba Le Gusta/08 María Caracoles.mp3"
I have been doing some research and I believe this issues is do to the "special characters" in the filename.
When viewing the directory in Finder I can "see" the file, but opening it does not work and the file icon is not correct (ie, not music icon).
I have tried everything I could find on the web, but I have not found a fix.
I have added fruit and catia to the VFS objects in the share as wells as:
fruit:resource = file
fruit:metadata = netatalk
fruit:locking = netatalk
fruit:encoding = native
Does anyone know how to deal with this?
The SMB service is set for DOC CP437 (which does not matter as this is a Mac) and UNIX UTF-8
#5 Updated by Timur Bakeyev over 2 years ago
- Status changed from Not Started to In Progress
The problem you described in the report indeed looks like MacOS NFD vs Unix NFC UTF8 charsets incompatibility issue. You already a lot of advises on the forum and in general they had to work.
It it could be that due various options you tried things got messed up though.
So, lets start from the basics. All of your files on FreeNAS were copied from MacOS with
rsync --iconv=utf-8-mac,utf-8 ..?
It could be that you have some artifacts remaining from the previous attempts to copy the files.
So, assuming that
/Volumes/music/Afro Cuban All Stars/A Toda Cuba Le Gusta/08 María Caracoles.mp3 is still not visible on your Mac from the FreeNAS, can you perform on a FreeNAS the following command:
# cd "/Volumes/music/Afro Cuban All Stars/A Toda Cuba Le Gusta/" # ls 08* | od -t cxC
And paste the output here in the ticket.
I've linked the ticket with the similar issue to this one - you may try other recommendations from it as well.