]> arthur.barton.de Git - netatalk.git/blob - doc/manpages/man5/afp.conf.5.xml
Fix parsing of address[:port] strings for IPv6 addresses, bug #515
[netatalk.git] / doc / manpages / man5 / afp.conf.5.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <refentry id="afp.conf.5">
3   <refmeta>
4     <refentrytitle>afp.conf</refentrytitle>
5
6     <manvolnum>5</manvolnum>
7
8     <refmiscinfo class="date">30 Apr 2013</refmiscinfo>
9
10     <refmiscinfo class="source">@NETATALK_VERSION@</refmiscinfo>
11   </refmeta>
12
13   <refnamediv>
14     <refname>afp.conf</refname>
15
16     <refpurpose>Netatalk configuration file <indexterm>
17         <primary>afp.conf</primary>
18       </indexterm></refpurpose>
19   </refnamediv>
20
21   <refsect1>
22     <title>SYNOPSIS</title>
23
24     <para>The <filename>afp.conf</filename> file is the configuration file for
25     the <emphasis role="bold">Netatalk</emphasis> AFP file server.</para>
26
27     <para>All AFP specific configuration and AFP volume definitions are done
28     via this file.</para>
29   </refsect1>
30
31   <refsect1 id="FILEFORMATSECT">
32     <title>FILE FORMAT</title>
33
34     <para>The file consists of sections and parameters. A section begins with
35     the name of the section in square brackets and continues until the next
36     section begins. Sections contain parameters of the form: <programlisting>
37     <replaceable>name</replaceable> = <replaceable>value </replaceable>
38     </programlisting></para>
39
40     <para>The file is line-based - that is, each newline-terminated line
41     represents either a comment, a section name or a parameter.</para>
42
43     <para>Section and parameter names are case sensitive.</para>
44
45     <para>Only the first equals sign in a parameter is significant. Whitespace
46     before or after the first equals sign is discarded. Leading, trailing and
47     internal whitespace in section and parameter names is irrelevant. Leading
48     and trailing whitespace in a parameter value is discarded. Internal
49     whitespace within a parameter value is retained verbatim.</para>
50
51     <para>Any line beginning with a semicolon (<quote>;</quote>) or a hash
52     (<quote>#</quote>) character is ignored, as are lines containing only
53     whitespace.</para>
54
55     <para>Any line ending in a <quote> <literal>\</literal> </quote> is
56     continued on the next line in the customary UNIX fashion.</para>
57
58     <para>The values following the equals sign in parameters are all either a
59     string (no quotes needed) or a boolean, which may be given as yes/no, 1/0
60     or true/false. Case is not significant in boolean values, but is preserved
61     in string values. Some items such as create masks are numeric.</para>
62
63     <para>The parameter <option>include =
64     <replaceable>path</replaceable></option> allows you to include one config
65     file inside another. The file is included literally, as though typed in
66     place. Nested includes are not supported.</para>
67   </refsect1>
68
69   <refsect1>
70     <title>SECTION DESCRIPTIONS</title>
71
72     <para>Each section in the configuration file (except for the [Global]
73     section) describes a shared resource (known as a <quote>volume</quote>).
74     The section name is the name of the volume and the parameters within the
75     section define the volume attributes and options.</para>
76
77     <para>There are two special sections, [Global] and [Homes], which are
78     described under <emphasis>special sections</emphasis>. The following notes
79     apply to ordinary section descriptions.</para>
80
81     <para>A volume consists of a directory to which access is being given plus
82     a description of the access rights which are granted to the user of the
83     service. For volumes the <option>path</option> option must specify the
84     directory to share.</para>
85
86     <para>Any volume section without <option>path</option> option is
87     considered a <emphasis>vol preset</emphasis> which can be selected in
88     other volume sections via the <option>vol preset</option> option and
89     constitutes defaults for the volume. For any option specified both in a
90     preset <emphasis>and</emphasis> in a volume section the volume section
91     setting completely substitutes the preset option.</para>
92
93     <para>The access rights granted by the server are masked by the access
94     rights granted to the specified or guest UNIX user by the host system. The
95     server does not grant more access than the host system grants.</para>
96
97     <para>The following sample section defines an AFP volume. The user has
98     full access to the path <filename>/foo/bar</filename>. The share is
99     accessed via the share name <literal>baz</literal>: <programlisting> [baz]
100     path = /foo/bar </programlisting></para>
101   </refsect1>
102
103   <refsect1>
104     <title>SPECIAL SECTIONS</title>
105
106     <refsect2>
107       <title>The [Global] section</title>
108
109       <para>Parameters in this section apply to the server as a whole.
110       Parameters denoted by a (G) below are must be set in this
111       section.</para>
112     </refsect2>
113
114     <refsect2>
115       <title>The [Homes] section</title>
116
117       <para>This section enable sharing of the UNIX server user home
118       directories. Specifying an optional <option>path</option> parameter
119       means that not the whole user home will be shared but the subdirectory
120       <option>path</option>. It is necessary to define the <option>basedir
121       regex</option> option. It should be a regex which matches the parent
122       directory of the user homes. Parameters denoted by a (H) belong to
123       volume sections. The optional parameter <option>home name</option> can
124       be used to change the AFP volume name which <emphasis>$u's
125       home</emphasis> by default. See below under VARIABLE
126       SUBSTITUTIONS.</para>
127
128       <para>The following example illustrates this. Given all user home
129       directories are stored under <filename>/home</filename>:
130       <programlisting> [Homes]
131       path = afp-data
132       basedir regex = /home</programlisting> For a user
133       <emphasis>john</emphasis> this results in an AFP home volume with a path
134       of <filename>/home/john/afp-data</filename>.</para>
135
136       <para>If <option>basedir regex</option> contains symlink, set the
137       canonicalized absolute path. When <filename>/home</filename> links to
138       <filename>/usr/home</filename>: <programlisting> [Homes]
139       basedir regex = /usr/home</programlisting></para>
140     </refsect2>
141   </refsect1>
142
143   <refsect1>
144     <title>PARAMETERS</title>
145
146     <para>Parameters define the specific attributes of sections.</para>
147
148     <para>Some parameters are specific to the [Global] section (e.g.,
149     <emphasis>log type</emphasis>). All others are permissible only in volume
150     sections. The letter <emphasis>G</emphasis> in parentheses indicates that
151     a parameter is specific to the [Global] section. The letter
152     <emphasis>V</emphasis> indicates that a parameter can be specified in a
153     volume specific section.</para>
154   </refsect1>
155
156   <refsect1>
157     <title>VARIABLE SUBSTITUTIONS</title>
158
159     <para>You can use variables in volume names. The use of variables in paths
160     is not supported for now.</para>
161
162     <orderedlist>
163       <listitem>
164         <para>if you specify an unknown variable, it will not get
165         converted.</para>
166       </listitem>
167
168       <listitem>
169         <para>if you specify a known variable, but that variable doesn't have
170         a value, it will get ignored.</para>
171       </listitem>
172     </orderedlist>
173
174     <para>The variables which can be used for substitutions are:</para>
175
176     <variablelist>
177       <varlistentry>
178         <term>$b</term>
179
180         <listitem>
181           <para>basename</para>
182         </listitem>
183       </varlistentry>
184
185       <varlistentry>
186         <term>$c</term>
187
188         <listitem>
189           <para>client's ip address</para>
190         </listitem>
191       </varlistentry>
192
193       <varlistentry>
194         <term>$d</term>
195
196         <listitem>
197           <para>volume pathname on server</para>
198         </listitem>
199       </varlistentry>
200
201       <varlistentry>
202         <term>$f</term>
203
204         <listitem>
205           <para>full name (contents of the gecos field in the passwd
206           file)</para>
207         </listitem>
208       </varlistentry>
209
210       <varlistentry>
211         <term>$g</term>
212
213         <listitem>
214           <para>group name</para>
215         </listitem>
216       </varlistentry>
217
218       <varlistentry>
219         <term>$h</term>
220
221         <listitem>
222           <para>hostname</para>
223         </listitem>
224       </varlistentry>
225
226       <varlistentry>
227         <term>$i</term>
228
229         <listitem>
230           <para>client's ip, without port</para>
231         </listitem>
232       </varlistentry>
233
234       <varlistentry>
235         <term>$s</term>
236
237         <listitem>
238           <para>server name (this can be the hostname)</para>
239         </listitem>
240       </varlistentry>
241
242       <varlistentry>
243         <term>$u</term>
244
245         <listitem>
246           <para>user name (if guest, it is the user that guest is running
247           as)</para>
248         </listitem>
249       </varlistentry>
250
251       <varlistentry>
252         <term>$v</term>
253
254         <listitem>
255           <para>volume name</para>
256         </listitem>
257       </varlistentry>
258
259       <varlistentry>
260         <term>$$</term>
261
262         <listitem>
263           <para>prints dollar sign ($)</para>
264         </listitem>
265       </varlistentry>
266     </variablelist>
267   </refsect1>
268
269   <refsect1>
270     <title>EXPLANATION OF GLOBAL PARAMETERS</title>
271
272     <refsect2>
273       <title>Authentication Options</title>
274
275       <variablelist>
276         <varlistentry>
277           <term>ad domain = <parameter>DOMAIN</parameter>
278           <type>(G)</type></term>
279
280           <listitem>
281             <para>Append @DOMAIN to username when authenticating. Useful in
282             Active Directory environments that otherwise would require the
283             user to enter the full user@domain string.</para>
284           </listitem>
285         </varlistentry>
286
287         <varlistentry>
288           <term>admin auth user = <parameter>user</parameter>
289           <type>(G)</type></term>
290
291           <listitem>
292             <para>Specifying eg "<option>admin auth user = root</option>"
293             whenever a normal user login fails, afpd will try to authenticate
294             as the specified <option>admin auth user</option>. If this
295             succeeds, a normal session is created for the original connecting
296             user. Said differently: if you know the password of <option>admin
297             auth user</option>, you can authenticate as any other user.</para>
298           </listitem>
299         </varlistentry>
300
301         <varlistentry>
302           <term>k5 keytab = <replaceable>path</replaceable>
303           <type>(G)</type></term>
304
305           <term>k5 service = <replaceable>service</replaceable>
306           <type>(G)</type></term>
307
308           <term>k5 realm = <replaceable>realm</replaceable>
309           <type>(G)</type></term>
310
311           <listitem>
312             <para>These are required if the server supports the Kerberos 5
313             authentication UAM.</para>
314           </listitem>
315         </varlistentry>
316
317         <varlistentry>
318           <term>nt domain = <parameter>DOMAIN</parameter>
319           <type>(G)</type></term>
320
321           <term>nt separator = <parameter>SEPARATOR</parameter>
322           <type>(G)</type></term>
323
324           <listitem>
325             <para>Use for eg. winbind authentication, prepends both strings
326             before the username from login and then tries to authenticate with
327             the result through the available and active UAM authentication
328             modules.</para>
329           </listitem>
330         </varlistentry>
331
332         <varlistentry>
333           <term>save password = <replaceable>BOOLEAN</replaceable> (default:
334           <emphasis>yes</emphasis>) <type>(G)</type></term>
335
336           <listitem>
337             <para>Enables or disables the ability of clients to save passwords
338             locally.</para>
339           </listitem>
340         </varlistentry>
341
342         <varlistentry>
343           <term>set password = <replaceable>BOOLEAN</replaceable> (default:
344           <emphasis>no</emphasis>) <type>(G)</type></term>
345
346           <listitem>
347             <para>Enables or disables the ability of clients to change their
348             passwords via chooser or the "connect to server" dialog.</para>
349           </listitem>
350         </varlistentry>
351
352         <varlistentry>
353           <term>uam list = <replaceable>uam list</replaceable>
354           <type>(G)</type></term>
355
356           <listitem>
357             <para>Space or comma separated list of UAMs. (The default is
358             "uams_dhx.so uams_dhx2.so").</para>
359
360             <para>The most commonly used UAMs are:</para>
361
362             <variablelist>
363               <varlistentry>
364                 <term>uams_guest.so</term>
365
366                 <listitem>
367                   <para>allows guest logins</para>
368                 </listitem>
369               </varlistentry>
370
371               <varlistentry>
372                 <term>uams_clrtxt.so</term>
373
374                 <listitem>
375                   <para>(uams_pam.so or uams_passwd.so) Allow logins with
376                   passwords transmitted in the clear. (legacy)</para>
377                 </listitem>
378               </varlistentry>
379
380               <varlistentry>
381                 <term>uams_randum.so</term>
382
383                 <listitem>
384                   <para>allows Random Number and Two-Way Random Number
385                   Exchange for authentication (requires a separate file
386                   containing the passwords, either @pkgconfdir@/afppasswd file or
387                   the one specified via "<option>passwd file</option>". See
388                   <citerefentry>
389                       <refentrytitle>afppasswd</refentrytitle>
390
391                       <manvolnum>1</manvolnum>
392                     </citerefentry> for details. (legacy)</para>
393                 </listitem>
394               </varlistentry>
395
396               <varlistentry>
397                 <term>uams_dhx.so</term>
398
399                 <listitem>
400                   <para>(uams_dhx_pam.so or uams_dhx_passwd.so) Allow
401                   Diffie-Hellman eXchange (DHX) for authentication.</para>
402                 </listitem>
403               </varlistentry>
404
405               <varlistentry>
406                 <term>uams_dhx2.so</term>
407
408                 <listitem>
409                   <para>(uams_dhx2_pam.so or uams_dhx2_passwd.so) Allow
410                   Diffie-Hellman eXchange 2 (DHX2) for authentication.</para>
411                 </listitem>
412               </varlistentry>
413
414               <varlistentry>
415                 <term>uam_gss.so</term>
416
417                 <listitem>
418                   <para>Allow Kerberos V for authentication (optional)</para>
419                 </listitem>
420               </varlistentry>
421             </variablelist>
422           </listitem>
423         </varlistentry>
424
425         <varlistentry>
426           <term>uam path = <replaceable>path</replaceable>
427           <type>(G)</type></term>
428
429           <listitem>
430             <para>Sets the default path for UAMs for this server (default is
431             @libdir@/netatalk).</para>
432           </listitem>
433         </varlistentry>
434       </variablelist>
435     </refsect2>
436
437     <refsect2>
438       <title>Charset Options</title>
439
440       <para>With OS X Apple introduced the AFP3 protocol. One of the big
441       changes was, that AFP3 uses Unicode names encoded as Decomposed UTF-8
442       (UTF8-MAC). Previous AFP/OS versions used charsets like MacRoman,
443       MacCentralEurope, etc.</para>
444
445       <para>To be able to serve AFP3 and older clients at the same time,
446       <command>afpd</command> needs to be able to convert between UTF-8 and
447       Mac charsets. Even OS X clients partly still rely on the mac charset. As
448       there's no way, <command>afpd</command> can detect the codepage a pre
449       AFP3 client uses, you have to specify it using the <option>mac
450       charset</option> option. The default is MacRoman, which should be fine
451       for most western users.</para>
452
453       <para>As <command>afpd</command> needs to interact with UNIX operating
454       system as well, it need's to be able to convert from UTF8-MAC / Mac
455       charset to the UNIX charset. By default <command>afpd</command> uses
456       <emphasis>UTF8</emphasis>. You can set the UNIX charset using the
457       <option>unix charset</option> option. If you're using extended
458       characters in the configuration files for <command>afpd</command>, make
459       sure your terminal matches the <option>unix charset</option>.</para>
460
461       <variablelist>
462         <varlistentry>
463           <term>mac charset = <parameter>CHARSET</parameter>
464           <type>(G)/(V)</type></term>
465
466           <listitem>
467             <para>Specifies the Mac clients charset, e.g.
468             <emphasis>MAC_ROMAN</emphasis>. This is used to convert strings
469             and filenames to the clients codepage for OS9 and Classic, i.e.
470             for authentication and AFP messages (SIGUSR2 messaging). This will
471             also be the default for the volumes <option>mac charset</option>.
472             Defaults to <emphasis>MAC_ROMAN</emphasis>.</para>
473           </listitem>
474         </varlistentry>
475
476         <varlistentry>
477           <term>unix charset = <parameter>CHARSET</parameter>
478           <type>(G)</type></term>
479
480           <listitem>
481             <para>Specifies the servers unix charset, e.g.
482             <emphasis>ISO-8859-15</emphasis> or <emphasis>EUC-JP</emphasis>.
483             This is used to convert strings to/from the systems locale, e.g.
484             for authentication, server messages and volume names. If
485             <emphasis>LOCALE</emphasis> is set, the systems locale is used.
486             Defaults to <emphasis>UTF8</emphasis>.</para>
487           </listitem>
488         </varlistentry>
489
490         <varlistentry>
491           <term>vol charset = <parameter>CHARSET</parameter>
492           <type>(G)/(V)</type></term>
493
494           <listitem>
495             <para>Specifies the encoding of the volumes filesystem. By
496             default, it is the same as <option>unix charset</option>.</para>
497           </listitem>
498         </varlistentry>
499       </variablelist>
500     </refsect2>
501
502     <refsect2>
503       <title>Password Options</title>
504
505       <variablelist>
506         <varlistentry>
507           <term>passwd file = <parameter>path</parameter>
508           <type>(G)</type></term>
509
510           <listitem>
511             <para>Sets the path to the Randnum UAM passwd file for this server
512             (default is @pkgconfdir@/afppasswd).</para>
513           </listitem>
514         </varlistentry>
515
516         <varlistentry>
517           <term>passwd minlen = <parameter>number</parameter>
518           <type>(G)</type></term>
519
520           <listitem>
521             <para>Sets the minimum password length, if supported by the
522             UAM</para>
523           </listitem>
524         </varlistentry>
525       </variablelist>
526     </refsect2>
527
528     <refsect2>
529       <title>Network Options</title>
530
531       <variablelist>
532         <varlistentry>
533           <term>advertise ssh = <replaceable>BOOLEAN</replaceable> (default:
534           <emphasis>no</emphasis>) <type>(G)</type></term>
535
536           <listitem>
537             <para>Allows old Mac OS X clients (10.3.3-10.4) to automagically
538             establish a tunneled AFP connection through SSH. If this option is
539             set, the server's answers to client's FPGetSrvrInfo requests
540             contain an additional entry. It depends on both client's settings
541             and a correctly configured and running <citerefentry>
542                 <refentrytitle>sshd</refentrytitle>
543
544                 <manvolnum>8</manvolnum>
545               </citerefentry> on the server to let things work.</para>
546
547             <note>
548               <para>Setting this option is not recommended since globally
549               encrypting AFP connections via SSH will increase the server's
550               load significantly. On the other hand, Apple's client side
551               implementation of this feature in MacOS X versions prior to
552               10.3.4 contained a security flaw.</para>
553             </note>
554           </listitem>
555         </varlistentry>
556
557         <varlistentry>
558           <term>afp interfaces = <replaceable>name [name ...]</replaceable>
559             <type>(G)</type></term>
560           <listitem>
561             <para>Specifies the network interfaces that the server should
562             listens on. The default is advertise the first IP address of the
563             system, but to listen for any incoming request.</para>
564           </listitem>
565         </varlistentry>
566
567         <varlistentry>
568           <term>afp listen = <replaceable>ip address[:port] [ip address[:port]
569           ...]</replaceable> <type>(G)</type></term>
570
571           <listitem>
572             <para>Specifies the IP address that the server should advertise
573             <emphasis role="bold">and</emphasis> listens to. The default is
574             advertise the first IP address of the system, but to listen for
575             any incoming request. The network address may be specified either
576             in dotted-decimal format for IPv4 or in hexadecimal format for
577             IPv6.</para>
578             <para>IPv6 address + port combination must use URL the format
579             using square brackets [IPv6]:port</para>
580           </listitem>
581         </varlistentry>
582
583         <varlistentry>
584           <term>afp port = <replaceable>port number</replaceable>
585           <type>(G)</type></term>
586
587           <listitem>
588             <para>Allows a different TCP port to be used for AFP. The default
589             is 548. Also sets the default port applied when none specified in
590             an <option>afp listen</option> option.</para>
591           </listitem>
592         </varlistentry>
593
594         <varlistentry>
595           <term>cnid listen = <replaceable>ip address[:port] [ip
596           address[:port] ...]</replaceable> <type>(G)</type></term>
597
598           <listitem>
599             <para>Specifies the IP address that the CNID server should listen
600             on. The default is <emphasis
601             role="bold">localhost:4700</emphasis>.</para>
602           </listitem>
603         </varlistentry>
604
605         <varlistentry>
606           <term>disconnect time = <replaceable>number</replaceable>
607           <type>(G)</type></term>
608
609           <listitem>
610             <para>Keep disconnected AFP sessions for
611             <parameter>number</parameter> hours before dropping them. Default
612             is 24 hours.</para>
613           </listitem>
614         </varlistentry>
615
616         <varlistentry>
617           <term>dsireadbuf = <replaceable>number</replaceable>
618           <type>(G)</type></term>
619
620           <listitem>
621             <para>Scale factor that determines the size of the DSI/TCP
622             readahead buffer, default is 12. This is multiplies with the DSI
623             server quantum (default ~300k) to give the size of the buffer.
624             Increasing this value might increase throughput in fast local
625             networks for volume to volume copies. <emphasis>Note</emphasis>:
626             This buffer is allocated per afpd child process, so specifying
627             large values will eat up large amount of memory (buffer size *
628             number of clients).</para>
629           </listitem>
630         </varlistentry>
631
632         <varlistentry>
633           <term>fqdn = <replaceable>name:port</replaceable>
634           <type>(G)</type></term>
635
636           <listitem>
637             <para>Specifies a fully-qualified domain name, with an optional
638             port. This is discarded if the server cannot resolve it. This
639             option is not honored by AppleShare clients &lt;= 3.8.3. This
640             option is disabled by default. Use with caution as this will
641             involve a second name resolution step on the client side. Also
642             note that afpd will advertise this name:port combination but not
643             automatically listen to it.</para>
644           </listitem>
645         </varlistentry>
646
647         <varlistentry>
648           <term>hostname = <replaceable>name</replaceable>
649           <type>(G)</type></term>
650
651           <listitem>
652             <para>Use this instead of the result from calling hostname for
653             determining which IP address to advertise, therefore the hostname
654             is resolved to an IP which is the advertised. This is NOT used for
655             listening and it is also overwritten by <option>afp
656             listen</option>.</para>
657           </listitem>
658         </varlistentry>
659
660         <varlistentry>
661           <term>max connections = <replaceable>number</replaceable>
662           <type>(G)</type></term>
663
664           <listitem>
665             <para>Sets the maximum number of clients that can simultaneously
666             connect to the server (default is 200).</para>
667           </listitem>
668         </varlistentry>
669
670         <varlistentry>
671           <term>server quantum = <replaceable>number</replaceable>
672           <type>(G)</type></term>
673
674           <listitem>
675             <para>This specifies the DSI server quantum. The default value is
676             1 MB. The maximum value is 0xFFFFFFFFF, the minimum is 32000. If
677             you specify a value that is out of range, the default value will
678             be set. Do not change this value unless you're absolutely sure,
679             what you're doing</para>
680           </listitem>
681         </varlistentry>
682
683         <varlistentry>
684           <term>sleep time = <replaceable>number</replaceable>
685           <type>(G)</type></term>
686
687           <listitem>
688             <para>Keep sleeping AFP sessions for <parameter>number</parameter>
689             hours before disconnecting clients in sleep mode. Default is 10
690             hours.</para>
691           </listitem>
692         </varlistentry>
693
694         <varlistentry>
695           <term>tcprcvbuf = <replaceable>number</replaceable>
696           <type>(G)</type></term>
697
698           <listitem>
699             <para>Try to set TCP receive buffer using setsockpt(). Often OSes
700             impose restrictions on the applications ability to set this
701             value.</para>
702           </listitem>
703         </varlistentry>
704
705         <varlistentry>
706           <term>tcpsndbuf = <replaceable>number</replaceable>
707           <type>(G)</type></term>
708
709           <listitem>
710             <para>Try to set TCP send buffer using setsockpt(). Often OSes
711             impose restrictions on the applications ability to set this
712             value.</para>
713           </listitem>
714         </varlistentry>
715
716         <varlistentry>
717           <term>use sendfile = <replaceable>BOOLEAN</replaceable> (default:
718           <emphasis>yes</emphasis>) <type>(G)</type></term>
719
720           <listitem>
721             <para>Whether to use sendfile<indexterm>
722                 <primary>sendfile</primary>
723               </indexterm> syscall for sending file data to clients.</para>
724           </listitem>
725         </varlistentry>
726
727         <varlistentry>
728           <term>zeroconf = <replaceable>BOOLEAN</replaceable> (default:
729           <emphasis>yes</emphasis>) <type>(G)</type></term>
730
731           <listitem>
732             <para>Whether to use automatic Zeroconf<indexterm>
733                 <primary>Zeroconf</primary>
734
735                 <secondary>Bonjour</secondary>
736               </indexterm> service registration if Avahi or mDNSResponder were
737             compiled in.</para>
738           </listitem>
739         </varlistentry>
740       </variablelist>
741     </refsect2>
742
743     <refsect2>
744       <title>Miscellaneous Options</title>
745
746       <variablelist>
747         <varlistentry>
748           <term>admin group = <replaceable>group</replaceable>
749           <type>(G)</type></term>
750
751           <listitem>
752             <para>Allows users of a certain group to be seen as the superuser
753             when they log in. This option is disabled by default.</para>
754           </listitem>
755         </varlistentry>
756
757         <varlistentry>
758           <term>afp read locks = <replaceable>BOOLEAN</replaceable> (default:
759           <emphasis>no</emphasis>) <type>(G)</type></term>
760
761           <listitem>
762             <para>Whether to apply locks to the byte region read in FPRead
763             calls. The AFP spec mandates this, but it's not really in line
764             with UNIX semantics and is a performance hug.</para>
765           </listitem>
766         </varlistentry>
767
768         <varlistentry>
769           <term>afpstats = <replaceable>BOOLEAN</replaceable> (default:
770           <emphasis>no</emphasis>) <type>(G)</type></term>
771
772           <listitem>
773             <para>Whether to provide AFP runtime statistics (connected
774             users, open volumes) via dbus.</para>            
775           </listitem>
776         </varlistentry>
777
778         <varlistentry>
779           <term>basedir regex = <replaceable>regex</replaceable>
780           <type>(H)</type></term>
781
782           <listitem>
783             <para>Regular expression which matches the parent directory of the
784             user homes. If <option>basedir regex</option> contains symlink,
785             you must set the canonicalized absolute path. In the simple case
786             this is just a path ie <option>basedir regex =
787             /home</option></para>
788           </listitem>
789         </varlistentry>
790
791         <varlistentry>
792           <term>close vol = <replaceable>BOOLEAN</replaceable> (default:
793           <emphasis>no</emphasis>) <type>(G)</type></term>
794
795           <listitem>
796             <para>Whether to close volumes possibly opened by clients when
797             they're removed from the configuration and the configuration is
798             reloaded.</para>
799           </listitem>
800         </varlistentry>
801
802         <varlistentry>
803           <term>cnid server = <replaceable>ipaddress[:port]</replaceable>
804           <type>(G)/(V)</type></term>
805
806           <listitem>
807             <para>Specifies the IP address and port of a cnid_metad server,
808             required for CNID dbd backend. Defaults to localhost:4700. The
809             network address may be specified either in dotted-decimal format
810             for IPv4 or in hexadecimal format for IPv6.-</para>
811           </listitem>
812         </varlistentry>
813
814         <varlistentry>
815           <term>dircachesize = <replaceable>number</replaceable>
816           <type>(G)</type></term>
817
818           <listitem>
819             <para>Maximum possible entries in the directory cache. The cache
820             stores directories and files. It is used to cache the full path to
821             directories and CNIDs which considerably speeds up directory
822             enumeration.</para>
823
824             <para>Default size is 8192, maximum size is 131072. Given value is
825             rounded up to nearest power of 2. Each entry takes about 100
826             bytes, which is not much, but remember that every afpd child
827             process for every connected user has its cache.</para>
828           </listitem>
829         </varlistentry>
830
831         <varlistentry>
832           <term>extmap file = <parameter>path</parameter>
833           <type>(G)</type></term>
834
835           <listitem>
836             <para>Sets the path to the file which defines file extension
837             type/creator mappings. (default is @pkgconfdir@/extmap.conf).</para>
838           </listitem>
839         </varlistentry>
840
841         <varlistentry>
842           <term>guest account = <replaceable>name</replaceable>
843           <type>(G)</type></term>
844
845           <listitem>
846             <para>Specifies the user that guests should use (default is
847             "nobody"). The name should be quoted.</para>
848           </listitem>
849         </varlistentry>
850
851         <varlistentry>
852           <term>home name = <replaceable>name</replaceable>
853           <type>(H)</type></term>
854
855           <listitem>
856             <para>AFP user home volume name. The default is <emphasis>user's
857             home</emphasis>.</para>
858           </listitem>
859         </varlistentry>
860
861         <varlistentry>
862           <term>login message = <replaceable>message</replaceable>
863           <type>(G)/(V)</type></term>
864
865           <listitem>
866             <para>Sets a message to be displayed when clients logon to the
867             server. The message should be in <option>unix charset</option> and
868             should be quoted. Extended characters are allowed.</para>
869           </listitem>
870         </varlistentry>
871
872         <varlistentry>
873           <term>ignored attributes = <replaceable>all | nowrite | nodelete | norename</replaceable>
874           <type>(G)/(V)</type></term>
875
876           <listitem>
877             <para>Speficy a set of file and directory attributes that shall
878             be ignored by the server, <attribute>all</attribute> includes all
879             the other options.</para>
880             <para>In OS X when the Finder sets a lock on a file/directory or you
881             set the BSD uchg flag in the Terminal, all three attributes are
882             used. Thus in order to ignore the Finder lock/BSD uchg flag, add
883             set <emphasis>ignored attributes = all</emphasis>.</para>
884           </listitem>
885         </varlistentry>
886
887         <varlistentry>
888           <term>mimic model = <replaceable>model</replaceable>
889           <type>(G)</type></term>
890
891           <listitem>
892             <para>Specifies the icon model that appears on clients. Defaults
893             to off. Note that afpd must support Zeroconf.
894             Examples: RackMac (same as Xserve), PowerBook, PowerMac,
895             Macmini, iMac, MacBook, MacBookPro, MacBookAir, MacPro,
896             AppleTV1,1, AirPort.</para>
897           </listitem>
898         </varlistentry>
899
900         <varlistentry>
901           <term>signature = &lt;text&gt; <type>(G)</type></term>
902
903           <listitem>
904             <para>Specify a server signature. The maximum length is 16
905             characters. This option is useful for clustered environments, to
906             provide fault isolation etc. By default, afpd generate signature
907             and saving it to
908             <filename>@localstatedir@/netatalk/afp_signature.conf</filename>
909             automatically (based on random number). See also
910             asip-status.pl(1).</para>
911           </listitem>
912         </varlistentry>
913
914         <varlistentry>
915           <term>solaris share reservations =
916           <replaceable>BOOLEAN</replaceable> (default:
917           <emphasis>yes</emphasis>) <type>(G)</type></term>
918
919           <listitem>
920             <para>Use share reservations on Solaris. Solaris CIFS server uses
921             this too, so this makes a lock coherent multi protocol
922             server.</para>
923           </listitem>
924         </varlistentry>
925
926         <varlistentry>
927           <term>vol dbpath = <replaceable>path</replaceable>
928           <type>(G)</type></term>
929
930           <listitem>
931             <para>Sets the database information to be stored in path. You have
932             to specify a writable location, even if the volume is read only.
933             The default is
934             <filename>@localstatedir@/netatalk/CNID/</filename>.</para>
935           </listitem>
936         </varlistentry>
937
938         <varlistentry>
939           <term>volnamelen = <replaceable>number</replaceable>
940           <type>(G)</type></term>
941
942           <listitem>
943             <para>Max length of UTF8-MAC volume name for Mac OS X. Note that
944             Hangul is especially sensitive to this.</para>
945
946             <para><programlisting> 73: limit of Mac OS X 10.1 80: limit of Mac
947             OS X 10.4/10.5 (default) 255: limit of recent Mac OS
948             X</programlisting> Mac OS 9 and earlier are not influenced by
949             this, because Maccharset volume name is always limited to 27
950             bytes.</para>
951           </listitem>
952         </varlistentry>
953
954         <varlistentry>
955           <term>vol preset = <replaceable>name</replaceable>
956           <type>(G)/(V)</type></term>
957
958           <listitem>
959             <para>Use section <option>name</option> as option preset for all
960             volumes (when set in the [Global] section) or for one volume (when
961             set in that volume's section).</para>
962           </listitem>
963         </varlistentry>
964       </variablelist>
965     </refsect2>
966
967     <refsect2>
968       <title>Logging Options</title>
969
970       <variablelist>
971         <varlistentry>
972           <term>log file = <replaceable>logfile</replaceable>
973           <type>(G)</type></term>
974
975           <listitem>
976             <para>If not specified Netatalk logs to syslogs daemon facility.
977             Otherwise it logs to <option>logfile</option>.</para>
978           </listitem>
979         </varlistentry>
980
981         <varlistentry>
982           <term>log level = <replaceable>type:level [type:level
983           ...]</replaceable> <type>(G)</type></term>
984
985           <term>log level = <replaceable>type:level,[type:level,
986           ...]</replaceable> <type>(G)</type></term>
987
988           <listitem>
989             <para>Specify that any message of a loglevel up to the given
990             <option>log level</option> should be logged.</para>
991
992             <para>By default afpd logs to syslog with a default logging setup
993             equivalent to <option>default:note</option></para>
994
995             <para>logtypes: default, afpdaemon, logger, uamsdaemon</para>
996
997             <para>loglevels: severe, error, warn, note, info, debug, debug6,
998             debug7, debug8, debug9, maxdebug</para>
999
1000             <note>
1001               <para>Both logtype and loglevels are case insensitive.</para>
1002             </note>
1003           </listitem>
1004         </varlistentry>
1005       </variablelist>
1006     </refsect2>
1007
1008     <refsect2 id="fceconf">
1009       <title>Filesystem Change Events (FCE<indexterm>
1010           <primary>FCE</primary>
1011         </indexterm>)</title>
1012
1013       <para>Netatalk includes a nifty filesystem change event mechanism where
1014       afpd processes notify interested listeners about certain filesystem
1015       event by UDP network datagrams.</para>
1016
1017       <variablelist>
1018         <varlistentry>
1019           <term>fce listener = <replaceable>host[:port]</replaceable>
1020           <type>(G)</type></term>
1021
1022           <listitem>
1023             <para>Enables sending FCE events to the specified
1024             <parameter>host</parameter>, default <parameter>port</parameter>
1025             is 12250 if not specified. Specifying multiple listeners is done
1026             by having this option once for each of them.</para>
1027           </listitem>
1028         </varlistentry>
1029
1030         <varlistentry>
1031           <term>fce events =
1032           <replaceable>fmod,fdel,ddel,fcre,dcre,tmsz</replaceable>
1033           <type>(G)</type></term>
1034
1035           <listitem>
1036             <para>Specifies which FCE events are active, default is
1037             <parameter>fmod,fdel,ddel,fcre,dcre</parameter>.</para>
1038           </listitem>
1039         </varlistentry>
1040
1041         <varlistentry>
1042           <term>fce coalesce = <replaceable>all|delete|create</replaceable>
1043           <type>(G)</type></term>
1044
1045           <listitem>
1046             <para>Coalesce FCE events.</para>
1047           </listitem>
1048         </varlistentry>
1049
1050         <varlistentry>
1051           <term>fce holdfmod = <replaceable>seconds</replaceable>
1052           <type>(G)</type></term>
1053
1054           <listitem>
1055             <para>This determines the time delay in seconds which is always
1056             waited if another file modification for the same file is done by a
1057             client before sending an FCE file modification event (fmod). For
1058             example saving a file in Photoshop would generate multiple events
1059             by itself because the application is opening, modifying and
1060             closing a file multiple times for every "save". Default: 60
1061             seconds.</para>
1062           </listitem>
1063         </varlistentry>
1064       </variablelist>
1065     </refsect2>
1066
1067     <refsect2>
1068       <title>Debug Parameters</title>
1069
1070       <para>These options are useful for debugging only.</para>
1071
1072       <variablelist>
1073         <varlistentry>
1074           <term>tickleval = <replaceable>number</replaceable>
1075           <type>(G)</type></term>
1076
1077           <listitem>
1078             <para>Sets the tickle timeout interval (in seconds). Defaults to
1079             30.</para>
1080           </listitem>
1081         </varlistentry>
1082
1083         <varlistentry>
1084           <term>timeout = <replaceable>number</replaceable>
1085           <type>(G)</type></term>
1086
1087           <listitem>
1088             <para>Specify the number of tickles to send before timing out a
1089             connection. The default is 4, therefore a connection will timeout
1090             after 2 minutes.</para>
1091           </listitem>
1092         </varlistentry>
1093
1094         <varlistentry>
1095           <term>client polling = <replaceable>BOOLEAN</replaceable> (default:
1096           <emphasis>no</emphasis>) <type>(G)</type></term>
1097
1098           <listitem>
1099             <para>With this option enabled, afpd won't advertise that it is
1100             capable of server notifications, so that connected clients poll
1101             the server every 10 seconds to detect changes in opened server
1102             windows. <emphasis>Note</emphasis>: Depending on the number of
1103             simultaneously connected clients and the network's speed, this can
1104             lead to a significant higher load on your network!</para>
1105
1106             <para>Do not use this option any longer as present Netatalk
1107             correctly supports server notifications, allowing connected
1108             clients to update folder listings in case another client changed
1109             the contents.</para>
1110           </listitem>
1111         </varlistentry>
1112       </variablelist>
1113     </refsect2>
1114
1115     <refsect2 id="acl_options">
1116       <title>Options for ACL handling</title>
1117
1118       <para>By default, the effective permission of the authenticated user are
1119       only mapped to the mentioned UARights permission structure, not the UNIX
1120       mode. You can adjust this behaviour with the configuration option
1121       <option>mac acls</option>:</para>
1122
1123       <variablelist id="mac_acls">
1124         <varlistentry>
1125           <term>map acls = <parameter>none|rights|mode</parameter>
1126           <type>(G)</type></term>
1127
1128           <listitem>
1129             <para><variablelist>
1130                 <varlistentry>
1131                   <term>none</term>
1132
1133                   <listitem>
1134                     <para>no mapping of ACLs </para>
1135                   </listitem>
1136                 </varlistentry>
1137
1138                 <varlistentry>
1139                   <term>rights</term>
1140
1141                   <listitem>
1142                     <para>effective permissions are mapped to UARights
1143                     structure. This is the default.</para>
1144                   </listitem>
1145                 </varlistentry>
1146
1147                 <varlistentry>
1148                   <term>mode</term>
1149
1150                   <listitem>
1151                     <para>ACLs are additionally mapped to the UNIX mode of the
1152                     filesystem object.</para>
1153                   </listitem>
1154                 </varlistentry>
1155               </variablelist></para>
1156           </listitem>
1157         </varlistentry>
1158       </variablelist>
1159
1160       <para>If you want to be able to display ACLs on the client, you must
1161       setup both client and server as part on a authentication domain
1162       (directory service, eg LDAP, Open Directory, Active Directory). The
1163       reason is, in OS X ACLs are bound to UUIDs, not just uid's or gid's.
1164       Therefor Netatalk must be able to map every filesystem uid and gid to a
1165       UUID so that it can return the server side ACLs which are bound to UNIX
1166       uid and gid mapped to OS X UUIDs.</para>
1167
1168       <para>Netatalk can query a directory server using LDAP queries. Either
1169       the directory server already provides an UUID attribute for user and
1170       groups (Active Directory, Open Directory) or you reuse an unused
1171       attribute (or add a new one) to you directory server (eg
1172       OpenLDAP).</para>
1173
1174       <para>The following LDAP options must be configured for Netatalk:</para>
1175
1176       <variablelist>
1177         <varlistentry>
1178           <term>ldap auth method = <parameter>none|simple|sasl</parameter>
1179           <type>(G)</type></term>
1180
1181           <listitem>
1182             <para>Authentication method: <option>none | simple |
1183             sasl</option></para>
1184
1185             <para><variablelist>
1186                 <varlistentry>
1187                   <term>none</term>
1188
1189                   <listitem>
1190                     <para>anonymous LDAP bind</para>
1191                   </listitem>
1192                 </varlistentry>
1193
1194                 <varlistentry>
1195                   <term>simple</term>
1196
1197                   <listitem>
1198                     <para>simple LDAP bind</para>
1199                   </listitem>
1200                 </varlistentry>
1201
1202                 <varlistentry>
1203                   <term>sasl</term>
1204
1205                   <listitem>
1206                     <para>SASL. Not yet supported !</para>
1207                   </listitem>
1208                 </varlistentry>
1209               </variablelist></para>
1210           </listitem>
1211         </varlistentry>
1212
1213         <varlistentry>
1214           <term>ldap auth dn = <parameter>dn</parameter>
1215           <type>(G)</type></term>
1216
1217           <listitem>
1218             <para>Distinguished Name of the user for simple bind.</para>
1219           </listitem>
1220         </varlistentry>
1221
1222         <varlistentry>
1223           <term>ldap auth pw = <parameter>password</parameter>
1224           <type>(G)</type></term>
1225
1226           <listitem>
1227             <para>Distinguished Name of the user for simple bind.</para>
1228           </listitem>
1229         </varlistentry>
1230
1231         <varlistentry>
1232           <term>ldap server = <parameter>host</parameter>
1233           <type>(G)</type></term>
1234
1235           <listitem>
1236             <para>Name or IP address of your LDAP Server. This is only needed
1237             for explicit ACL support in order to be able to query LDAP for
1238             UUIDs.</para>
1239
1240             <para>You can use <citerefentry>
1241                 <refentrytitle>afpldaptest</refentrytitle>
1242
1243                 <manvolnum>1</manvolnum>
1244               </citerefentry> to syntactically check your config.</para>
1245           </listitem>
1246         </varlistentry>
1247
1248         <varlistentry>
1249           <term>ldap userbase = <parameter>base dn</parameter>
1250           <type>(G)</type></term>
1251
1252           <listitem>
1253             <para>DN of the user container in LDAP.</para>
1254           </listitem>
1255         </varlistentry>
1256
1257         <varlistentry>
1258           <term>ldap userscope = <parameter>scope</parameter>
1259           <type>(G)</type></term>
1260
1261           <listitem>
1262             <para>Search scope for user search: <option>base | one |
1263             sub</option></para>
1264           </listitem>
1265         </varlistentry>
1266
1267         <varlistentry>
1268           <term>ldap groupbase = <parameter>base dn</parameter>
1269           <type>(G)</type></term>
1270
1271           <listitem>
1272             <para>DN of the group container in LDAP.</para>
1273           </listitem>
1274         </varlistentry>
1275
1276         <varlistentry>
1277           <term>ldap groupscope = <parameter>scope</parameter>
1278           <type>(G)</type></term>
1279
1280           <listitem>
1281             <para>Search scope for user search: <option>base | one |
1282             sub</option></para>
1283           </listitem>
1284         </varlistentry>
1285
1286         <varlistentry>
1287           <term>ldap uuid attr = <parameter>dn</parameter>
1288           <type>(G)</type></term>
1289
1290           <listitem>
1291             <para>Name of the LDAP attribute with the UUIDs.</para>
1292
1293             <para>Note: this is used both for users and groups.</para>
1294           </listitem>
1295         </varlistentry>
1296
1297         <varlistentry>
1298           <term>ldap name attr = <parameter>dn</parameter>
1299           <type>(G)</type></term>
1300
1301           <listitem>
1302             <para>Name of the LDAP attribute with the users short name.</para>
1303           </listitem>
1304         </varlistentry>
1305
1306         <varlistentry>
1307           <term>ldap uuid string = <parameter>STRING</parameter>
1308           <type>(G)</type></term>
1309
1310           <listitem>
1311             <para>Format of the uuid string in the directory. A series of x
1312             and -, where every x denotes a value 0-9a-f and every - is a
1313             separator.</para>
1314
1315             <para>Default: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</para>
1316           </listitem>
1317         </varlistentry>
1318
1319         <varlistentry>
1320           <term>ldap uuid encoding = <parameter>string | ms-guid (default:
1321           string)</parameter> <type>(G)</type></term>
1322
1323           <listitem>
1324             <para>Format of the UUID of the LDAP attribute, allows usage of
1325             the binary objectGUID fields from Active Directory. If left
1326             unspecified, string is the default, which passes through the ASCII
1327             UUID returned by most other LDAP stores. If set to ms-guid, the
1328             internal UUID representation is converted to and from the binary
1329             format used in the objectGUID attribute found on objects in Active
1330             Directory when interacting with the server.</para>
1331
1332             <para><variablelist>
1333                 <varlistentry>
1334                   <term>string</term>
1335
1336                   <listitem>
1337                     <para>UUID is a string, use with eg OpenDirectory.</para>
1338                   </listitem>
1339                 </varlistentry>
1340
1341                 <varlistentry>
1342                   <term>ms-guid</term>
1343
1344                   <listitem>
1345                     <para>Binary objectGUID from Active Directory</para>
1346                   </listitem>
1347                 </varlistentry>
1348               </variablelist></para>
1349           </listitem>
1350         </varlistentry>
1351
1352         <varlistentry>
1353           <term>ldap group attr = <parameter>dn</parameter>
1354           <type>(G)</type></term>
1355
1356           <listitem>
1357             <para>Name of the LDAP attribute with the groups short
1358             name.</para>
1359           </listitem>
1360         </varlistentry>
1361       </variablelist>
1362     </refsect2>
1363   </refsect1>
1364
1365   <refsect1>
1366     <title>EXPLANATION OF VOLUME PARAMETERS</title>
1367
1368     <refsect2>
1369       <title>Parameters</title>
1370
1371       <para>The section name defines the volume name.
1372       No two volumes may have the same
1373       name. The volume name cannot contain the <keycode>':'</keycode>
1374       character. The volume name is mangled if it is very long. Mac charset
1375       volume name is limited to 27 characters. UTF8-MAC volume name is limited
1376       to volnamelen parameter.</para>
1377
1378       <variablelist>
1379         <varlistentry>
1380           <term>path = <replaceable>PATH</replaceable> <type>(V)</type></term>
1381
1382           <listitem>
1383             <para>The path name must be a fully qualified path name.</para>
1384           </listitem>
1385         </varlistentry>
1386
1387         <varlistentry>
1388           <term>appledouble = <replaceable>ea|v2</replaceable>
1389           <type>(V)</type></term>
1390
1391           <listitem>
1392             <para>Specify the format of the metadata files, which are used for
1393             saving Mac resource fork as well. Earlier versions used
1394             AppleDouble v2, the new default format is <emphasis
1395             role="bold">ea</emphasis>.</para>
1396           </listitem>
1397         </varlistentry>
1398
1399         <varlistentry>
1400           <term>vol size limit = <replaceable>size in MiB</replaceable>
1401           <type>(V)</type></term>
1402
1403           <listitem>
1404             <para>Useful for Time Machine: limits the reported volume size,
1405             thus preventing Time Machine from using the whole real disk space
1406             for backup. Example: "vol size limit = 1000" would limit the
1407             reported disk space to 1 GB. <emphasis role="bold">IMPORTANT:
1408             </emphasis> This is an approximated calculation taking into
1409             account the contents of Time Machine sparsebundle images. Therefor
1410             you MUST NOT use this volume to store other content when using
1411             this option, because it would NOT be accounted. The calculation
1412             works by reading the band size from the Info.plist XML file of the
1413             sparsebundle, reading the bands/ directory counting the number of
1414             band files, and then multiplying one with the other.</para>
1415           </listitem>
1416         </varlistentry>
1417
1418         <varlistentry>
1419           <term>valid users = <replaceable>user @group</replaceable>
1420           <type>(V)</type></term>
1421
1422           <listitem>
1423             <para>The allow option allows the users and groups that access a
1424             share to be specified. Users and groups are specified, delimited
1425             by spaces or commas. Groups are designated by a @ prefix. Names
1426             may be quoted in order to allow for spaces in names. Example:
1427             <programlisting>valid users = user "user 2" @group â€œ@group 2"</programlisting></para>
1428           </listitem>
1429         </varlistentry>
1430
1431         <varlistentry>
1432           <term>invalid users = <replaceable>users/groups</replaceable>
1433           <type>(V)</type></term>
1434
1435           <listitem>
1436             <para>The deny option specifies users and groups who are not
1437             allowed access to the share. It follows the same format as the
1438             "valid users" option.</para>
1439           </listitem>
1440         </varlistentry>
1441
1442         <varlistentry>
1443           <term>hosts allow = <replaceable>IP host address/IP netmask bits [
1444           ... ]</replaceable> <type>(V)</type></term>
1445
1446           <listitem>
1447             <para>Only listed hosts and networks are allowed, all others are
1448             rejected. The network address may be specified either in
1449             dotted-decimal format for IPv4 or in hexadecimal format for
1450             IPv6.</para>
1451
1452             <para>Example: hosts allow = 10.1.0.0/16 10.2.1.100
1453             2001:0db8:1234::/48</para>
1454           </listitem>
1455         </varlistentry>
1456
1457         <varlistentry>
1458           <term>hosts deny = <replaceable>IP host address/IP netmask bits [
1459           ... ]</replaceable> <type>(V)</type></term>
1460
1461           <listitem>
1462             <para>Listed hosts and nets are rejected, all others are
1463             allowed.</para>
1464
1465             <para>Example: hosts deny = 192.168.100/24 10.1.1.1
1466             2001:db8::1428:57ab</para>
1467           </listitem>
1468         </varlistentry>
1469
1470         <varlistentry>
1471           <term>cnid scheme = <replaceable>backend</replaceable>
1472           <type>(V)</type></term>
1473
1474           <listitem>
1475             <para>set the CNID backend to be used for the volume, default is
1476             [@DEFAULT_CNID_SCHEME@] available schemes:
1477             [@compiled_backends@]</para>
1478           </listitem>
1479         </varlistentry>
1480
1481         <varlistentry>
1482           <term>ea = <replaceable>none|auto|sys|ad</replaceable>
1483           <type>(V)</type></term>
1484
1485           <listitem>
1486             <para>Specify how Extended Attributes<indexterm>
1487                 <primary>Extended Attributes</primary>
1488               </indexterm> are stored. <option>auto</option> is the
1489             default.</para>
1490
1491             <variablelist>
1492               <varlistentry>
1493                 <term>auto</term>
1494
1495                 <listitem>
1496                   <para>Try <option>sys</option> (by setting an EA on the
1497                   shared directory itself), fallback to <option>ad</option>.
1498                   Requires writable volume for performing test. "<option>read
1499                   only = yes</option>" overwrites <option>auto</option> with
1500                   <option>none</option>. Use explicit "<option>ea =
1501                   sys|ad</option>" for read-only volumes where
1502                   appropriate.</para>
1503                 </listitem>
1504               </varlistentry>
1505
1506               <varlistentry>
1507                 <term>sys</term>
1508
1509                 <listitem>
1510                   <para>Use filesystem Extended Attributes.</para>
1511                 </listitem>
1512               </varlistentry>
1513
1514               <varlistentry>
1515                 <term>ad</term>
1516
1517                 <listitem>
1518                   <para>Use files in <emphasis>.AppleDouble</emphasis>
1519                   directories.</para>
1520                 </listitem>
1521               </varlistentry>
1522
1523               <varlistentry>
1524                 <term>none</term>
1525
1526                 <listitem>
1527                   <para>No Extended Attributes support.</para>
1528                 </listitem>
1529               </varlistentry>
1530             </variablelist>
1531           </listitem>
1532         </varlistentry>
1533
1534         <varlistentry>
1535           <term>mac charset = <replaceable>CHARSET</replaceable>
1536           <type>(V)</type></term>
1537
1538           <listitem>
1539             <para>specifies the Mac client charset for this Volume, e.g.
1540             <emphasis>MAC_ROMAN</emphasis>, <emphasis>MAC_CYRILLIC</emphasis>.
1541             If not specified the global setting is applied. This setting is
1542             only required if you need volumes, where the Mac charset differs
1543             from the one globally set in the [Global] section.</para>
1544           </listitem>
1545         </varlistentry>
1546
1547         <varlistentry>
1548           <term>casefold = <option>option</option> <type>(V)</type></term>
1549
1550           <listitem>
1551             <para>The casefold option handles, if the case of filenames should
1552             be changed. The available options are:</para>
1553
1554             <para><option>tolower</option> - Lowercases names in both
1555             directions.</para>
1556
1557             <para><option>toupper</option> - Uppercases names in both
1558             directions.</para>
1559
1560             <para><option>xlatelower</option> - Client sees lowercase, server
1561             sees uppercase.</para>
1562
1563             <para><option>xlateupper</option> - Client sees uppercase, server
1564             sees lowercase.</para>
1565           </listitem>
1566         </varlistentry>
1567
1568         <varlistentry>
1569           <term>password = <replaceable>password</replaceable>
1570           <type>(V)</type></term>
1571
1572           <listitem>
1573             <para>This option allows you to set a volume password, which can
1574             be a maximum of 8 characters long (using ASCII strongly
1575             recommended at the time of this writing).</para>
1576           </listitem>
1577         </varlistentry>
1578
1579         <varlistentry>
1580           <term>file perm = <replaceable>mode</replaceable>
1581           <type>(V)</type></term>
1582
1583           <term>directory perm = <replaceable>mode</replaceable>
1584           <type>(V)</type></term>
1585
1586           <listitem>
1587             <para>Add(or) with the client requested permissions: <option>file
1588             perm</option> is for files only, <option>directory perm</option>
1589             is for directories only. Don't use with "<option>unix priv =
1590             no</option>".</para>
1591
1592             <example>
1593               <title>Volume for a collaborative workgroup</title>
1594
1595               <para><programlisting>file perm = 0660 directory perm =
1596               0770</programlisting></para>
1597             </example>
1598           </listitem>
1599         </varlistentry>
1600
1601         <varlistentry>
1602           <term>umask = <replaceable>mode</replaceable>
1603           <type>(V)</type></term>
1604
1605           <listitem>
1606             <para>set perm mask. Don't use with "<option>unix priv =
1607             no</option>".</para>
1608           </listitem>
1609         </varlistentry>
1610
1611         <varlistentry>
1612           <term>preexec = <replaceable>command</replaceable>
1613           <type>(V)</type></term>
1614
1615           <listitem>
1616             <para>command to be run when the volume is mounted, ignored for
1617             user defined volumes</para>
1618           </listitem>
1619         </varlistentry>
1620
1621         <varlistentry>
1622           <term>postexec = <replaceable>command</replaceable>
1623           <type>(V)</type></term>
1624
1625           <listitem>
1626             <para>command to be run when the volume is closed, ignored for
1627             user defined volumes</para>
1628           </listitem>
1629         </varlistentry>
1630
1631         <varlistentry>
1632           <term>root preexec = <replaceable>command</replaceable>
1633           <type>(V)</type></term>
1634
1635           <listitem>
1636             <para>command to be run as root when the volume is mounted,
1637             ignored for user defined volumes</para>
1638           </listitem>
1639         </varlistentry>
1640
1641         <varlistentry>
1642           <term>root postexec = <replaceable>command</replaceable>
1643           <type>(V)</type></term>
1644
1645           <listitem>
1646             <para>command to be run as root when the volume is closed, ignored
1647             for user defined volumes</para>
1648           </listitem>
1649         </varlistentry>
1650
1651         <varlistentry>
1652           <term>rolist = <option>users/groups</option> <type>(V)</type></term>
1653
1654           <listitem>
1655             <para>Allows certain users and groups to have read-only access to
1656             a share. This follows the allow option format.</para>
1657           </listitem>
1658         </varlistentry>
1659
1660         <varlistentry>
1661           <term>rwlist = <replaceable>users/groups</replaceable>
1662           <type>(V)</type></term>
1663
1664           <listitem>
1665             <para>Allows certain users and groups to have read/write access to
1666             a share. This follows the allow option format.</para>
1667           </listitem>
1668         </varlistentry>
1669
1670         <varlistentry>
1671           <term>veto files = <replaceable>vetoed names</replaceable>
1672           <type>(V)</type></term>
1673
1674           <listitem>
1675             <para>hide files and directories,where the path matches one of the
1676             '/' delimited vetoed names. The veto string must always be
1677             terminated with a '/', eg. "veto1/", "veto1/veto2/".</para>
1678           </listitem>
1679         </varlistentry>
1680       </variablelist>
1681     </refsect2>
1682
1683     <refsect2>
1684       <title>Volume options</title>
1685
1686       <para>Boolean volume options.</para>
1687
1688       <variablelist>
1689         <varlistentry>
1690           <term>acls = <replaceable>BOOLEAN</replaceable> (default:
1691           <emphasis>yes</emphasis>) <type>(V)</type></term>
1692
1693           <listitem>
1694             <para>Whether to flag volumes as supporting ACLs. If ACL support
1695             is compiled in, this is yes by default.</para>
1696           </listitem>
1697         </varlistentry>
1698
1699         <varlistentry>
1700           <term>cnid dev = <replaceable>BOOLEAN</replaceable> (default:
1701           <emphasis>yes</emphasis>) <type>(V)</type></term>
1702
1703           <listitem>
1704             <para>Whether to use the device number in the CNID backends. Helps
1705             when the device number is not constant across a reboot, eg
1706             cluster, ...</para>
1707           </listitem>
1708         </varlistentry>
1709
1710         <varlistentry>
1711           <term>convert appledouble = <replaceable>BOOLEAN</replaceable>
1712           (default: <emphasis>yes</emphasis>) <type>(V)</type></term>
1713
1714           <listitem>
1715             <para>Whether automatic conversion from <option>appledouble =
1716             v2</option> to <option>appledouble = ea</option> is performed when
1717             accessing filesystems from clients. This is generally useful, but
1718             costs some performance. It's recommendable to run
1719             <command>dbd</command> on volumes and do the conversion with that.
1720             Then this option can be set to no.</para>
1721           </listitem>
1722         </varlistentry>
1723
1724         <varlistentry>
1725           <term>follow symlinks = <replaceable>BOOLEAN</replaceable> (default:
1726           <emphasis>no</emphasis>) <type>(V)</type></term>
1727
1728           <listitem>
1729             <para>The default setting is false thus symlinks are not followed
1730             on the server. This is the same behaviour as OS X's AFP server.
1731             Setting the option to true causes afpd to follow symlinks on the
1732             server. symlinks may point outside of the AFP volume, currently
1733             afpd doesn't do any checks for "wide symlinks".</para>
1734           </listitem>
1735         </varlistentry>
1736
1737         <varlistentry>
1738           <term>invisible dots = <replaceable>BOOLEAN</replaceable> (default:
1739           <emphasis>no</emphasis>) <type>(V)</type></term>
1740
1741           <listitem>
1742             <para>make dot files invisible. WARNING: enabling this option will
1743               lead to unwanted sideeffects were OS X applications when saving
1744               files to a temporary file starting with a dot first, then renaming
1745               the temp file to its final name, result in the saved file being
1746               invisible. The only thing this option is useful for is making
1747               files that start with a dot invisible on Mac OS 9. It's
1748               completely useless on Mac OS X, as both in Finder and in Terminal
1749               files starting with a dot are hidden anyway.</para>
1750           </listitem>
1751         </varlistentry>
1752
1753         <varlistentry>
1754           <term>network ids = <replaceable>BOOLEAN</replaceable> (default:
1755           <emphasis>yes</emphasis>) <type>(V)</type></term>
1756
1757           <listitem>
1758             <para>Whether the server support network ids. Setting this to
1759             <emphasis>no</emphasis> will result in the client not using ACL
1760             AFP functions.</para>
1761           </listitem>
1762         </varlistentry>
1763
1764         <varlistentry>
1765           <term>preexec close = <replaceable>BOOLEAN</replaceable> (default:
1766           <emphasis>no</emphasis>) <type>(V)</type></term>
1767
1768           <listitem>
1769             <para>A non-zero return code from preexec close the volume being
1770             immediately, preventing clients to mount/see the volume in
1771             question.</para>
1772           </listitem>
1773         </varlistentry>
1774
1775         <varlistentry>
1776           <term>read only = <replaceable>BOOLEAN</replaceable> (default:
1777           <emphasis>no</emphasis>) <type>(V)</type></term>
1778
1779           <listitem>
1780             <para>Specifies the share as being read only for all users.
1781             Overwrites <option>ea = auto</option> with <option>ea =
1782             none</option></para>
1783           </listitem>
1784         </varlistentry>
1785
1786         <varlistentry>
1787           <term>root preexec close= <replaceable>BOOLEAN</replaceable>
1788           (default: <emphasis>no</emphasis>) <type>(V)</type></term>
1789
1790           <listitem>
1791             <para>A non-zero return code from root_preexec closes the volume
1792             immediately, preventing clients to mount/see the volume in
1793             question.</para>
1794           </listitem>
1795         </varlistentry>
1796
1797         <varlistentry>
1798           <term>search db = <replaceable>BOOLEAN</replaceable> (default:
1799           <emphasis>no</emphasis>) <type>(V)</type></term>
1800
1801           <listitem>
1802             <para>Use fast CNID database namesearch instead of slow recursive
1803             filesystem search. Relies on a consistent CNID database, ie Samba
1804             or local filesystem access lead to inaccurate or wrong results.
1805             Works only for "dbd" CNID db volumes.</para>
1806           </listitem>
1807         </varlistentry>
1808
1809         <varlistentry>
1810           <term>stat vol = <replaceable>BOOLEAN</replaceable> (default:
1811           <emphasis>yes</emphasis>) <type>(V)</type></term>
1812
1813           <listitem>
1814             <para>Whether to stat volume path when enumerating volumes list,
1815             useful for automounting or volumes created by a preexec
1816             script.</para>
1817           </listitem>
1818         </varlistentry>
1819
1820         <varlistentry>
1821           <term>time machine = <replaceable>BOOLEAN</replaceable> (default:
1822           <emphasis>no</emphasis>) <type>(V)</type></term>
1823
1824           <listitem>
1825             <para>Whether to enable Time Machine support for this
1826             volume.</para>
1827           </listitem>
1828         </varlistentry>
1829
1830         <varlistentry>
1831           <term>unix priv = <replaceable>BOOLEAN</replaceable> (default:
1832           <emphasis>yes</emphasis>) <type>(V)</type></term>
1833
1834           <listitem>
1835             <para>Whether to use AFP3 UNIX privileges. This should be set for
1836             OS X clients. See also: <option>file perm</option>,
1837             <option>directory perm</option> and <option>umask</option>.</para>
1838           </listitem>
1839         </varlistentry>
1840       </variablelist>
1841     </refsect2>
1842   </refsect1>
1843
1844   <refsect1>
1845     <title>CNID backends</title>
1846
1847     <para>The AFP protocol mostly refers to files and directories by ID and
1848     not by name. Netatalk needs a way to store these ID's in a persistent way,
1849     to achieve this several different CNID backends are available. The CNID
1850     Databases are by default located in the
1851     <filename>@localstatedir@/netatalk/CNID/(volumename)/.AppleDB/</filename>
1852     directory.</para>
1853
1854     <variablelist>
1855       <varlistentry>
1856         <term>cdb</term>
1857
1858         <listitem>
1859           <para>"Concurrent database", backend is based on Oracle Berkley DB.
1860           With this backend several <command>afpd</command> daemons access the
1861           CNID database directly. Berkeley DB locking is used to synchronize
1862           access, if more than one <command>afpd</command> process is active
1863           for a volume. The drawback is, that the crash of a single
1864           <command>afpd</command> process might corrupt the database.</para>
1865         </listitem>
1866       </varlistentry>
1867
1868       <varlistentry>
1869         <term>dbd</term>
1870
1871         <listitem>
1872           <para>Access to the CNID database is restricted to the
1873           <command>cnid_metad</command> daemon process.
1874           <command>afpd</command> processes communicate with the daemon for
1875           database reads and updates. If built with Berkeley DB transactions
1876           the probability for database corruption is practically zero, but
1877           performance can be slower than with <option>cdb</option></para>
1878         </listitem>
1879       </varlistentry>
1880
1881       <varlistentry>
1882         <term>last</term>
1883
1884         <listitem>
1885           <para>This backend is an exception, in terms of ID persistency. ID's
1886           are only valid for the current session. This is basically what
1887           <command>afpd</command> did in the 1.5 (and 1.6) versions. This
1888           backend is still available, as it is useful for e.g. sharing cdroms.
1889           Starting with Netatalk 3.0, it becomes the <emphasis>read only
1890           mode</emphasis> automatically.</para>
1891
1892           <para><emphasis role="bold">Warning</emphasis>: It is
1893           <emphasis>NOT</emphasis> recommended to use this backend for volumes
1894           anymore, as <command>afpd</command> now relies heavily on a
1895           persistent ID database. Aliases will likely not work and filename
1896           mangling is not supported.</para>
1897         </listitem>
1898       </varlistentry>
1899     </variablelist>
1900
1901     <para>Even though <command>./configure --help</command> might show that
1902     there are other CNID backends available, be warned those are likely broken
1903     or mainly used for testing. Don't use them unless you know what you're
1904     doing, they may be removed without further notice from future
1905     versions.</para>
1906   </refsect1>
1907
1908   <refsect1>
1909     <title>Charset options</title>
1910
1911     <para>With OS X Apple introduced the AFP3 protocol. One of the most
1912     important changes was that AFP3 uses unicode names encoded as UTF-8
1913     decomposed. Previous AFP/OS versions used codepages, like MacRoman,
1914     MacCentralEurope, etc.</para>
1915
1916     <para><command>afpd</command> needs a way to preserve extended Macintosh
1917     characters, or characters illegal in unix filenames, when saving files on
1918     a unix filesystem. Earlier versions used the the so called CAP encoding.
1919     An extended character (&gt;0x7F) would be converted to a :xx sequence,
1920     e.g. the Apple Logo (MacRoman: 0xF0) was saved as <literal>:f0</literal>.
1921     Some special characters will be converted as to :xx notation as well.
1922     '<keycode>/</keycode>' will be encoded to <literal>:2f</literal>, if
1923     <option>usedots</option> is not specified, a leading dot
1924     '<keycode>.</keycode>' will be encoded as <literal>:2e</literal>.</para>
1925
1926     <para>This version now uses UTF-8 as the default encoding for names.
1927     '<keycode>/</keycode>' will be converted to '<keycode>:</keycode>'.</para>
1928
1929     <para>The <option>vol charset</option> option will allow you to select
1930     another volume encoding. E.g. for western users another useful setting
1931     could be vol charset ISO-8859-15. <command>afpd</command> will accept any
1932     <citerefentry>
1933         <refentrytitle><command>iconv</command></refentrytitle>
1934
1935         <manvolnum>1</manvolnum>
1936       </citerefentry> provided charset. If a character cannot be converted
1937     from the <option>mac charset</option> to the selected <option>vol
1938     charset</option>, afpd will save it as a CAP encoded character. For AFP3
1939     clients, <command>afpd</command> will convert the UTF-8<indexterm>
1940         <primary>UTF8</primary>
1941
1942         <secondary>afpd's vol charset setting</secondary>
1943       </indexterm><indexterm>
1944         <primary>UTF8-MAC</primary>
1945
1946         <secondary>afpd's vol charset setting</secondary>
1947       </indexterm><indexterm>
1948         <primary>ISO-8859-15</primary>
1949
1950         <secondary>afpd's vol charset setting</secondary>
1951       </indexterm><indexterm>
1952         <primary>ISO-8859-1</primary>
1953
1954         <secondary>afpd's vol charset setting</secondary>
1955       </indexterm> character to <option>mac charset</option> first. If this
1956     conversion fails, you'll receive a -50 error on the mac.</para>
1957
1958     <para><emphasis>Note</emphasis>: Whenever you can, please stick with the
1959     default UTF-8 volume format.</para>
1960   </refsect1>
1961
1962   <refsect1>
1963     <title>SEE ALSO</title>
1964
1965     <para><citerefentry>
1966         <refentrytitle>afpd</refentrytitle>
1967
1968         <manvolnum>8</manvolnum>
1969       </citerefentry>, <citerefentry>
1970         <refentrytitle>afppasswd</refentrytitle>
1971
1972         <manvolnum>5</manvolnum>
1973       </citerefentry>, <citerefentry>
1974         <refentrytitle>afp_signature.conf</refentrytitle>
1975
1976         <manvolnum>5</manvolnum>
1977       </citerefentry>, <citerefentry>
1978         <refentrytitle>extmap.conf</refentrytitle>
1979
1980         <manvolnum>5</manvolnum>
1981       </citerefentry>, <citerefentry>
1982         <refentrytitle>cnid_metad</refentrytitle>
1983
1984         <manvolnum>8</manvolnum>
1985       </citerefentry></para>
1986   </refsect1>
1987 </refentry>