Interoperation of Netatalk and Samba on FreeBSD

From Netatalk Wiki
(Difference between revisions)
Jump to: navigation, search
(Introduction)
Line 1: Line 1:
 
== Introduction ==
 
== Introduction ==
Recent Netatalk and Samba can store metadata in the compatible format.
+
Recent Netatalk (≧ 3.1.8) and Samba (≧ 3.6.0) can store metadata in the compatible format.
  
 
It was tested by the following package.
 
It was tested by the following package.

Revision as of 15:41, 27 March 2017

Introduction

Recent Netatalk (≧ 3.1.8) and Samba (≧ 3.6.0) 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.

/usr/ports/net/samba44/files/patch-source3__modules__vfs_fruit.c:
--- 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 AFPINFO_EA_NETATALK NETATALK_META_XATTR
 #define AFPRESOURCE_EA_NETATALK "org.netatalk.ResourceFork"
 #else

Using these, the following access becomes possible.

Netatalk

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".

Ex:

[Global]
    vol preset = my default values

[my default values]
    ea = samba

[Homes]
    basedir regex = /usr/home

[Test Volume]
    path = /export/test1

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

Samba

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".

Ex:

[global]
    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

[homes]

[Test Volume]
    path = /export/test1

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

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox