5

I have a unix server (arch linux) with samba 4.1.12. The share has files inside it with utf-8 nfc encoding (standard utf-8).

When I mount this samba share into an osx client (10.9.5), files 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 inside the share, it displays correctly in osx but on the unix server it is display with a weird symbol like File with quotes.

I think it is because osx expects the filenames to be in utf-8 nfd form, but the files are server as utf-8 nfc.

Basically I want to have a working samba share 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?

How can I tell osx to simply use utf-8 nfc encoding for the samba share? Is there a way to do it?

I already tried things like explicitly setting the encoding in smb.conf on the unix server, 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

dos charset = utf-8-mac

# --> error in log:
# dos charset 'utf-8-mac' unavailable - using ASCII
  • You'll have to specify the client charset with the dos charset parameter in smb.conf. – Sacha K Oct 14 '14 at 16:26
  • dos charset = utf-8? unfortunately no change in behaviour – Markus Oct 14 '14 at 16:31
  • Try dos charset = utf-8-mac – Sacha K Oct 14 '14 at 16:41
  • looks like it is not available in arch linux: dos charset 'utf-8-mac' unavailable - using ASCII - can it be installed? – Markus Oct 14 '14 at 16:55
4

This is/was a missing feature in the samba client. In samba 4.2 there is the vfs_fruit module to overcome this restrictions - see the mailing list thread https://lists.samba.org/archive/samba/2014-December/187545.html for more details.

With the vfs_fruit module you can do:

vfs objects = catia fruit streams_xattr
fruit:encoding = native

And samba transparently maps the filenames for osx clients (even it still has some problems if files end with a space for example).

0

Did you try adding mangled names = no to smb.conf?

  • Thanks for your reply, but it basically is a missing feature in samba - see my answer. – Markus Mar 4 '15 at 17:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.