Interoperation of Netatalk and Samba on FreeBSD

From Netatalk Wiki
(Difference between revisions)
Jump to: navigation, search
(Introduction)
 
Line 1: Line 1:
 
== Introduction ==
 
== Introduction ==
In case of FreeBSD, recent Netatalk (≧ 3.1.8) and Samba (≧ 3.6.0) 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.
 
*netatalk3-3.1.11,1
 
*netatalk3-3.1.11,1
*samba44-4.4.8_1
+
*samba46-4.6.1_2
 
+
The samba44 package is old but no problem. It's because the following patch is applied.
+
 
+
<blockquote>
+
<tt>/usr/ports/net/samba44/files/patch-source3__modules__vfs_fruit.c</tt>:
+
<tt>
+
<pre>
+
--- 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
+
</pre>
+
</tt>
+
</blockquote>
+
  
 
Using these, the following access becomes possible.
 
Using these, the following access becomes possible.
Line 69: Line 48:
 
Using "<tt>hide files</tt>", the invisible files created via Netatalk are hidden from Windows.
 
Using "<tt>hide files</tt>", the invisible files created via Netatalk are hidden from Windows.
 
Use "<tt>hide files</tt>", not "<tt>veto files</tt>".
 
Use "<tt>hide files</tt>", not "<tt>veto files</tt>".
 
Don't use "<tt>fruit:locking = netatalk</tt>" because it has [https://lists.samba.org/archive/samba/2015-December/196828.html a bug].
 
  
 
<tt>[My Time Machine Volume]</tt> is commented out because Time Machine feature can not be used via SMB.
 
<tt>[My Time Machine Volume]</tt> is commented out because Time Machine feature can not be used via SMB.
Line 86: Line 63:
 
     ea support = Yes
 
     ea support = Yes
 
     vfs objects = catia fruit streams_xattr
 
     vfs objects = catia fruit streams_xattr
fruit:locking = netatalk
+
    fruit:locking = netatalk
 
     fruit:encoding = native
 
     fruit:encoding = native
 
     streams_xattr:prefix = user.
 
     streams_xattr:prefix = user.

Latest revision as of 14:49, 28 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.

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

[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