Interoperation of Netatalk and Samba on FreeBSD

From Netatalk Wiki
Revision as of 15:25, 22 March 2017 by Hat (Talk | contribs)
Jump to: navigation, search


Recent Netatalk and Samba can store metadata in the compatible format.

It was tested by the following package.

The samba44 package is old but no problem. It's because the following patch is applied.


--- source3/modules/vfs_fruit.c.orig    2016-12-28 02:48:27.478460000 +0000
+++ source3/modules/vfs_fruit.c 2016-12-28 02:48:58.141967000 +0000
@@ -105,7 +105,7 @@
  * This is hokey, but what else can we do?
 #define NETATALK_META_XATTR "org.netatalk.Metadata"
-#if defined(HAVE_ATTROPEN) || defined(FREEBSD)
+#if defined(HAVE_ATTROPEN)
 #define AFPRESOURCE_EA_NETATALK "org.netatalk.ResourceFork"

Using these, the following access becomes possible.


Using "vol preset" option, the same configuration is set for all volumes.

Using "ea = samba", Extended Attributes become compatible with Samba.

Edit "/usr/local/etc/afp.conf".


    vol preset = my default values

[my default values]
    ea = samba

    basedir regex = /usr/home

[Test Volume]
    path = /export/test1

[My Time Machine Volume]
    path = /export/timemachine
    time machine = yes


Setting various options in [global], the same configuration is set for all shares.

Three vfs objects (catia, fruit and streams_xattr) provide enhanced compatibility with Apple SMB clients and interoperability with a Netatalk.

Using "hide files", the invisible files created via Netatalk are hidden from Windows. Use "hide files", not "veto files".

Don't use "fruit:locking = netatalk" because it has a bug.

[My Time Machine Volume] is commented out because Time Machine feature can not be used via SMB.

Edit "/usr/local/etc/smb4.conf".


    foo = bar
    baz = qux

    ea support = Yes
    vfs objects = catia fruit streams_xattr
;   fruit:locking = netatalk
    fruit:encoding = native
    streams_xattr:prefix = user.
    streams_xattr:store_stream_type = no

    hide files = /.DS_Store/Network Trash Folder/TheFindByContentFolder/TheVolumeSettingsFolder/Temporary Items/.TemporaryItems/.VolumeIcon.icns/Icon?/.FBCIndex/.FBCLockFolder/

    read only = No


[Test Volume]
    path = /export/test1

;[My Time Machine Volume]
;   path = /export/timemachine

Personal tools