Markus Doits
2014-Dec-10 10:10 UTC
[Samba] Mount unix samba 4 share to osx client without mangled file names
Hello, I have a unix server (arch linux) with samba 4.1.14. The share has files inside which where created directly on the server. Linux and OSX (10.10.1) clients should access the share and store files. When I mount this samba share into the osx client (10.10.1), files created directly on the server with special names like `File with "quotes"` are displayed mangled (`C7XSWH~V`) on the osx client. When I create a file with special chars on the OSX client mount, it displays correctly in OSX but on the unix server it is display with a weird symbol like `File with ?quotes?`. I assume it is because OSX expects the filenames to be in utf-8 nfd form, but the filenames on the server server are stored in utf-8 nfc form. Am I right about this? Is this the problem? Basically I want to have a working samba share on my linux server where users from OSX and unix clients can access and store files, and special chars in file names should be allowed. Is there any way to do this cross platform? Do I have to tell osx to simply use utf-8 nfc encoding for the samba share? Or is there some special samba server/client config? I already tried things like explicitly setting the encoding in smb.conf on the unix server (withtout *really* knowing what I do), with no luck: ---- unix charset = utf-8 dos charset = utf-8 # --> error in log: # invalid DOS charset: 'dos charset' must not be UTF8, using (default # value) CP850 instead # or like suggested in SO comment http://serverfault.com/questions/636956/mount-unix-samba-4-share-to-osx-client-without-mangled-file-names dos charset = utf-8-mac # --> error in log: # dos charset 'utf-8-mac' unavailable - using ASCII ---- Is there a way to set up the samba server in a heterogeneous environment (osx and linux)? Thanks for your help! Markus
Ralph Böhme
2014-Dec-10 11:06 UTC
[Samba] Mount unix samba 4 share to osx client without mangled file names
Hi, On Wed, Dec 10, 2014 at 11:10:36AM +0100, Markus Doits wrote:> I have a unix server (arch linux) with samba 4.1.14. The share has files > inside which where created directly on the server. Linux and OSX > (10.10.1) clients should access the share and store files. > > When I mount this samba share into the osx client (10.10.1), files > created directly on the server with special names like `File with > "quotes"` are displayed mangled (`C7XSWH~V`) on the osx client.these are NTFS/SMB illegal character so Samba must mangle them.> When I create a file with special chars on the OSX client mount, it > displays correctly in OSX but on the unix server it is display with a > weird symbol like `File with ?quotes?`.That's the Unicode glyph for character in the Unicode private use range. OS X maps all illegal NTFS characters to the Unicode private range, the mapping is the venerable SFM sheme.> I assume it is because OSX expects the filenames to be in utf-8 nfd > form, but the filenames on the server server are stored in utf-8 nfc form.No, different issue, just as bad. :)> Am I right about this? Is this the problem? > > Basically I want to have a working samba share on my linux server where > users from OSX and unix clients can access and store files, and special > chars in file names should be allowed. Is there any way to do this cross > platform? > > Do I have to tell osx to simply use utf-8 nfc encoding for the samba > share? Or is there some special samba server/client config?yes. vfs_fruit and fruit:encoding = native cf man vfs_fruit. You'll need 4.2 for that, if you wait a few more days you'll get 4.2rc3 that'll also ship my AAPL performance patches for OS X clients. -Ralph -- SerNet GmbH, Bahnhofsallee 1b, 37081 G?ttingen phone: +49-551-370000-0, fax: +49-551-370000-9 AG G?ttingen, HRB 2816, GF: Dr. Johannes Loxen http://www.sernet.de,mailto:kontakt at sernet.de
Markus Doits
2014-Dec-11 12:04 UTC
[Samba] Mount unix samba 4 share to osx client without mangled file names
Hi Ralph, Thanks, it works as expected with 4.2.0rc2! I simply followed the manual and added this to the share's config: vfs objects = catia fruit streams_xattr fruit:resource = file fruit:metadata = netatalk fruit:locking = netatalk fruit:encoding = native Thanks for your help. Markus On 10.12.14 12:06, Ralph B?hme wrote:> Hi, > > On Wed, Dec 10, 2014 at 11:10:36AM +0100, Markus Doits wrote: >> I have a unix server (arch linux) with samba 4.1.14. The share has files >> inside which where created directly on the server. Linux and OSX >> (10.10.1) clients should access the share and store files. >> >> When I mount this samba share into the osx client (10.10.1), files >> created directly on the server with special names like `File with >> "quotes"` are displayed mangled (`C7XSWH~V`) on the osx client. > these are NTFS/SMB illegal character so Samba must mangle them. > >> When I create a file with special chars on the OSX client mount, it >> displays correctly in OSX but on the unix server it is display with a >> weird symbol like `File with ?quotes?`. > That's the Unicode glyph for character in the Unicode private use > range. OS X maps all illegal NTFS characters to the Unicode private > range, the mapping is the venerable SFM sheme. > >> I assume it is because OSX expects the filenames to be in utf-8 nfd >> form, but the filenames on the server server are stored in utf-8 nfc form. > No, different issue, just as bad. :) > >> Am I right about this? Is this the problem? >> >> Basically I want to have a working samba share on my linux server where >> users from OSX and unix clients can access and store files, and special >> chars in file names should be allowed. Is there any way to do this cross >> platform? >> >> Do I have to tell osx to simply use utf-8 nfc encoding for the samba >> share? Or is there some special samba server/client config? > yes. vfs_fruit and > > fruit:encoding = native > > cf man vfs_fruit. You'll need 4.2 for that, if you wait a few more > days you'll get 4.2rc3 that'll also ship my AAPL performance patches > for OS X clients. > > -Ralph >
Reasonably Related Threads
- Mount unix samba 4 share to osx client without mangled file names
- Mount unix samba 4 share to osx client without mangled file names
- Symbolic links not visible on osx 10.10
- Mac clients trouble with NFD accented characters on Samba share
- [PATCH v2 0/4] New getprogname module