File: configuration.xml

package info (click to toggle)
netatalk 3.1.12~ds-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 14,756 kB
  • sloc: ansic: 104,976; sh: 8,247; xml: 7,394; perl: 1,936; makefile: 1,430; python: 1,342; yacc: 309; lex: 49
file content (2007 lines) | stat: -rw-r--r-- 77,754 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
<?xml version="1.0" encoding="UTF-8"?>
<chapter id="configuration">
  <title>Setting up Netatalk</title>

  <sect1>
    <title>File Services<indexterm>
        <primary>File Services</primary>

        <secondary>Netatalk's File Services</secondary>
      </indexterm></title>

    <para>Netatalk supplies AFP<indexterm>
        <primary>AFP</primary>

        <secondary>Apple Filing Protocol</secondary>
      </indexterm> services.</para>

    <sect2>
      <title>Setting up the AFP file server</title>

      <para>AFP (the Apple Filing Protocol) is the protocol Apple Macintoshes
      use for file services. The protocol has evolved over the years. The
      latest change to the protocol, called "AFP 3.4", was added with a
      minor release of OS X Lion<indexterm>
          <primary>Lion</primary>

          <secondary>Mac OS X 10.7</secondary>
        </indexterm> (10.7).</para>

      <para>The afpd daemon offers the fileservices to Apple clients. The only
      configuration file is <filename>afp.conf</filename>. It uses a ini style
      configuration syntax.</para>

      <para>Support for <link linkend="spotlight">Spotlight</link><indexterm>
          <primary>Spotlight</primary>
        </indexterm> has been added in Netatalk 3.1. See this <link
      linkend="spotlight-compile">section</link> for information on how to
      compile Netatalk with Spotlight support.</para>

      <para>Mac OS X 10.5 (Leopard) added support for Time Machine backups
      over AFP. Two new functions ensure that backups are written to spinning
      disk, not just in the server's cache. Different host operating systems
      honour this cache flushing differently. To make a volume a Time Machine
      target use the volume option "<option>time machine =
      yes</option>".</para>

      <para>Starting with Netatalk 2.1 UNIX symlinks<indexterm>
          <primary>symlink</primary>

          <secondary>UNIX symlink</secondary>
        </indexterm> can be used on the server. Semantics are the same as for
      e.g. NFS, i.e. they are not resolved on the server side but instead it's
      completely up to the client to resolve them, resulting in links that
      point somewhere inside the clients filesystem view.</para>

      <sect3>
        <title>afp.conf</title>

        <para><filename>afp.conf</filename> is the configuration file used by
        afpd to determine the behaviour and configuration of the AFP file
        serverand the AFP volume that it provides.</para>

        <para>The <filename>afp.conf</filename> is divided into several
        sections:<variablelist>
            <varlistentry>
              <term>[Global]</term>

              <listitem>
                <para>The global section defines general server options</para>
              </listitem>
            </varlistentry>

            <varlistentry>
              <term>[Homes]</term>

              <listitem>
                <para>The homes section defines user home volumes</para>
              </listitem>
            </varlistentry>
          </variablelist>Any section not called <option>Global</option> or
        <option>Homes</option> is interpreted as an AFP volume.</para>

        <para>For sharing user homes by defining a <option>Homes</option>
        section you must specify the option <option>basedir regex</option>
        which can be a simple string with the path to the parent directory of
        all user homes or a regular expression.</para>

        <para>Example:</para>

        <para><programlisting>[Homes]
basedir regex = /home
</programlisting></para>

        <para>Now any user logging into the AFP server will have a user volume
        available whose path is <filename>/home/NAME</filename>.</para>

        <para>A more complex setup would be a server with a large amount of
        user homes which are split across e.g. two different
        filesystems:<itemizedlist>
            <listitem>
              <para>/RAID1/homes</para>
            </listitem>

            <listitem>
              <para>/RAID2/morehomes</para>
            </listitem>
          </itemizedlist>The following configuration is
        required:<programlisting>[Homes]
basedir regex = /RAID./.*homes
</programlisting></para>

        <para>If <option>basedir regex</option> contains symlink, set the
        canonicalized absolute path. When <filename>/home</filename> links to
        <filename>/usr/home</filename>: <programlisting>[Homes]
basedir regex = /usr/home</programlisting></para>

        <para>For a more detailed explanation of the available options, please
        refer to the <citerefentry>
            <refentrytitle>afp.conf</refentrytitle>

            <manvolnum>5</manvolnum>
          </citerefentry> man page.</para>
      </sect3>
    </sect2>

    <sect2 id="CNID-backends">
      <title>CNID<indexterm>
          <primary>CNID</primary>

          <secondary>Catalog Node ID</secondary>
        </indexterm> backends<indexterm>
          <primary>Backend</primary>

          <secondary>CNID backend</secondary>
        </indexterm></title>

      <para>Unlike other protocols like SMB or NFS, the AFP protocol mostly
      refers to files and directories by ID and not by a path (the IDs are
      also called CNID, that means Catalog Node ID). A typical AFP request
      uses a directory ID<indexterm>
          <primary>DID</primary>

          <secondary>Directory ID</secondary>
        </indexterm> and a filename, something like <phrase>"server, please
      open the file named 'Test' in the directory with id 167"</phrase>. For
      example "Aliases" on the Mac basically work by ID (with a fallback to
      the absolute path in more recent AFP clients. But this applies only to
      Finder, not to applications).</para>

      <para>Every file in an AFP volume has to have a unique file ID<indexterm>
          <primary>FID</primary>

          <secondary>File ID</secondary>
        </indexterm>, IDs must, according to the specs, never be reused, and
      IDs are 32 bit numbers (Directory IDs use the same ID pool). So, after
      ~4 billion files/folders have been written to an AFP volume, the ID pool
      is depleted and no new file can be written to the volume. No whining
      please :-)</para>

      <para>Netatalk needs to map IDs to files and folders in the host
      filesystem. To achieve this, several different CNID backends<indexterm>
          <primary>CNID backend</primary>
        </indexterm> are available and can be choosed by the <option>cnid
      scheme</option><indexterm>
          <primary>cnidscheme</primary>

          <secondary>specifying a CNID backend</secondary>
        </indexterm> option in the <citerefentry>
          <refentrytitle>afp.conf</refentrytitle>

          <manvolnum>5</manvolnum>
        </citerefentry> configuration file. A CNID backend is basically a
      database storing ID &lt;-&gt; name mappings.</para>

      <para>The CNID Databases are by default located in
      <filename>/var/lib/netatalk/CNID</filename>.</para>

      <para>There is a command line utility called <command>dbd</command>
      available which can be used to verify, repair and rebuild the CNID
      database.</para>

      <note>
        <para>There are some CNID related things you should keep in mind when
        working with netatalk:</para>

        <itemizedlist>
          <listitem>
            <para>Don't nest volumes<indexterm>
                <primary>Nested volumes</primary>
              </indexterm> unless "<option>vol dbnest = yes</option>" is set.</para>
          </listitem>

          <listitem>
            <para>CNID backends are databases, so they turn afpd into a file
            server/database mix.</para>
          </listitem>

          <listitem>
            <para>If there's no more space on the filesystem left, the
            database will get corrupted. You can work around this by either
            using the <option>vol dbpath</option> option and put the database
            files into another location or, if you use quotas, make sure the
            CNID database folder is owned by a user/group without a
            quota<indexterm>
                <primary>Quotas</primary>

                <secondary>Disk usage quotas</secondary>
              </indexterm>.</para>
          </listitem>

          <listitem>
            <para>Be careful with CNID databases for volumes that are mounted
            via NFS. That is a pretty audacious decision to make anyway, but
            putting a database there as well is really asking for trouble,
            i.e. database corruption. Use the <option>vol dbpath</option>
            directive to put the databases onto a local disk if you must use
            NFS<indexterm>
                <primary>NFS</primary>

                <secondary>Network File System</secondary>
              </indexterm> mounted volumes.</para>
          </listitem>
        </itemizedlist>
      </note>

      <sect3>
        <title>cdb<indexterm>
            <primary>CDB</primary>

            <secondary>"cdb" CNID backend</secondary>
          </indexterm></title>

        <para>The "concurrent database" backend is based on Berkeley DB. With
        this backend, several afpd daemons access the CNID database directly.
        Berkeley DB locking is used to synchronize access, if more than one
        afpd process is active for a volume. The drawback is, that the crash
        of a single afpd process might corrupt the database. cdb should only
        be used when sharing home directories for a larger number of users
        <emphasis>and</emphasis> it has been determined that a large number of
        <command>cnid_dbd</command> processes is problematic.</para>
      </sect3>

      <sect3>
        <title>dbd<indexterm>
            <primary>DBD</primary>

            <secondary>"dbd" CNID backend</secondary>
          </indexterm></title>

        <para>Access to the CNID database is restricted to the cnid_dbd daemon
        process. afpd processes communicate with the daemon for database reads
        and updates. The probability for database corruption is practically
        zero.</para>

        <para>This is the default backend since Netatalk 2.1.</para>
      </sect3>

      <sect3>
        <title>tdb<indexterm>
            <primary>tdb</primary>

            <secondary>"tdb" CNID backend</secondary>
          </indexterm></title>

        <para><abbrev>tdb</abbrev> is another persistent CNID database, it's
        Samba's <emphasis>Trivial Database</emphasis>. It could be used
        instead of <abbrev>cdb</abbrev> for user volumes.<important>
            <para>Only ever use it for volumes that are
            <emphasis>not</emphasis> shared and accessed by multiple clients
            at once !</para>
          </important>This backend is also used internally (as in-memory CNID
        database) as a fallback in case opening the primary database can't be
        opened, because <abbrev>tdb</abbrev> can work as in-memory database.
        This of course means upon restart the CNIDs are gone.</para>
      </sect3>

      <sect3>
        <title>last<indexterm>
            <primary>Last</primary>

            <secondary>"last" CNID backend</secondary>
          </indexterm></title>

        <para>The last backend is a in-memory tdb database. It is not
        persistent. Starting with netatalk 3.0, it becomes the <emphasis> read
        only mode</emphasis> automatically. This is useful e.g. for
        CD-ROMs.</para>
      </sect3>

      <sect3>
        <title>mysql<indexterm>
            <primary>MySQL</primary>

            <secondary>"mysql" CNID backend</secondary>
          </indexterm></title>

        <para>CNID backend using a MySQL server.</para>
      </sect3>
    </sect2>

    <sect2 id="charsets">
      <title>Charsets<indexterm>
          <primary>Charset</primary>

          <secondary>character set</secondary>
        </indexterm>/Unicode<indexterm>
          <primary>Unicode</primary>
        </indexterm></title>

      <para></para>

      <sect3>
        <title>Why Unicode?</title>

        <para>Internally, computers don't know anything about characters and
        texts, they only know numbers. Therefore, each letter is assigned a
        number. A character set, often referred to as
        <emphasis>charset</emphasis> or
        <emphasis>codepage</emphasis><indexterm>
            <primary>Codepage</primary>
          </indexterm>, defines the mappings between numbers and
        letters.</para>

        <para>If two or more computer systems need to communicate with each
        other, the have to use the same character set. In the 1960s the
        ASCII<indexterm>
            <primary>ASCII</primary>

            <secondary>American Standard Code for Information
            Interchange</secondary>
          </indexterm> (American Standard Code for Information Interchange)
        character set was defined by the American Standards Association. The
        original form of ASCII represented 128 characters, more than enough to
        cover the English alphabet and numerals. Up to date, ASCII has been
        the normative character scheme used by computers.</para>

        <para>Later versions defined 256 characters to produce a more
        international fluency and to include some slightly esoteric graphical
        characters. Using this mode of encoding each character takes exactly
        one byte. Obviously, 256 characters still wasn't enough to map all the
        characters used in the various languages into one character
        set.</para>

        <para>As a result localized character sets were defined later, e.g the
        ISO-8859 character sets. Most operating system vendors introduced
        their own characters sets to satisfy their needs, e.g. IBM defined the
        <emphasis>codepage 437 (DOSLatinUS)</emphasis>, Apple introduced the
        <emphasis>MacRoman</emphasis><indexterm>
            <primary>MacRoman</primary>

            <secondary>MacRoman charset</secondary>
          </indexterm> codepage and so on. The characters that were assigned
        number larger than 127 were referred to as
        <emphasis>extended</emphasis> characters. These character sets
        conflict with another, as they use the same number for different
        characters, or vice versa.</para>

        <para>Almost all of those characters sets defined 256 characters,
        where the first 128 (0-127) character mappings are identical to ASCII.
        As a result, communication between systems using different codepages
        was effectively limited to the ASCII charset.</para>

        <para>To solve this problem new, larger character sets were defined.
        To make room for more character mappings, these character sets use at
        least 2 bytes to store a character. They are therefore referred to as
        <emphasis>multibyte</emphasis> character sets.</para>

        <para>One standardized multibyte charset encoding scheme is known as
        <ulink url="http://www.unicode.org/">unicode</ulink>. A big advantage
        of using a multibyte charset is that you only need one. There is no
        need to make sure two computers use the same charset when they are
        communicating.</para>
      </sect3>

      <sect3>
        <title>character sets used by Apple</title>

        <para>In the past, Apple clients used single-byte charsets to
        communicate over the network. Over the years Apple defined a number of
        codepages, western users will most likely be using the
        <emphasis>MacRoman</emphasis> codepage.</para>

        <para>Codepages defined by Apple include:</para>

        <itemizedlist>
          <listitem>
            <para>MacArabic, MacFarsi</para>
          </listitem>

          <listitem>
            <para>MacCentralEurope</para>
          </listitem>

          <listitem>
            <para>MacChineseSimple</para>
          </listitem>

          <listitem>
            <para>MacChineseTraditional</para>
          </listitem>

          <listitem>
            <para>MacCroation</para>
          </listitem>

          <listitem>
            <para>MacCyrillic</para>
          </listitem>

          <listitem>
            <para>MacDevanagari</para>
          </listitem>

          <listitem>
            <para>MacGreek</para>
          </listitem>

          <listitem>
            <para>MacHebrew</para>
          </listitem>

          <listitem>
            <para>MacIcelandic</para>
          </listitem>

          <listitem>
            <para>MacJapanese</para>
          </listitem>

          <listitem>
            <para>MacKorean</para>
          </listitem>

          <listitem>
            <para>MacRoman</para>
          </listitem>

          <listitem>
            <para>MacRomanian</para>
          </listitem>

          <listitem>
            <para>MacThai</para>
          </listitem>

          <listitem>
            <para>MacTurkish</para>
          </listitem>
        </itemizedlist>

        <para>Starting with Mac OS X and AFP3, <ulink
        url="http://www.utf-8.com/">UTF-8</ulink> is used. UTF-8 encodes
        Unicode characters in an ASCII compatible way, each Unicode character
        is encoded into 1-6 ASCII characters. UTF-8 is therefore not really a
        charset itself, it's an encoding of the Unicode charset.</para>

        <para>To complicate things, Unicode defines several <emphasis> <ulink
        url="http://www.unicode.org/reports/tr15/index.html">normalization</ulink>
        </emphasis> forms. While <ulink
        url="http://www.samba.org">samba</ulink><indexterm>
            <primary>Samba</primary>
          </indexterm> uses <emphasis>precomposed</emphasis><indexterm>
            <primary>Precomposed</primary>

            <secondary>Precomposed Unicode normalization</secondary>
          </indexterm> Unicode, which most Unix tools prefer as well, Apple
        decided to use the <emphasis>decomposed</emphasis><indexterm>
            <primary>Decomposed</primary>

            <secondary>Decomposed Unicode normalization</secondary>
          </indexterm> normalization.</para>

        <para>For example lets take the German character
        '<keycode>ä</keycode>'. Using the precomposed normalization, Unicode
        maps this character to 0xE4. In decomposed normalization, 'ä' is
        actually mapped to two characters, 0x61 and 0x308. 0x61 is the mapping
        for an 'a', 0x308 is the mapping for a <emphasis>COMBINING
        DIAERESIS</emphasis>.</para>

        <para>Netatalk refers to precomposed UTF-8 as
        <emphasis>UTF8</emphasis><indexterm>
            <primary>UTF8</primary>

            <secondary>Netatalk's precomposed UTF-8 encoding</secondary>
          </indexterm> and to decomposed UTF-8 as
        <emphasis>UTF8-MAC</emphasis><indexterm>
            <primary>UTF8-MAC</primary>

            <secondary>Netatalk's decomposed UTF-8 encoding</secondary>
          </indexterm>.</para>
      </sect3>

      <sect3>
        <title>afpd and character sets</title>

        <para>To support new AFP 3.x and older AFP 2.x clients at the same
        time, afpd needs to be able to convert between the various charsets
        used. AFP 3.x clients always use UTF8-MAC, AFP 2.x clients use one of
        the Apple codepages.</para>

        <para>At the time of this writing, netatalk supports the following
        Apple codepages:</para>

        <itemizedlist>
          <listitem>
            <para>MAC_CENTRALEUROPE</para>
          </listitem>

          <listitem>
            <para>MAC_CHINESE_SIMP</para>
          </listitem>

          <listitem>
            <para>MAC_CHINESE_TRAD</para>
          </listitem>

          <listitem>
            <para>MAC_CYRILLIC</para>
          </listitem>

          <listitem>
            <para>MAC_GREEK</para>
          </listitem>

          <listitem>
            <para>MAC_HEBREW</para>
          </listitem>

          <listitem>
            <para>MAC_JAPANESE</para>
          </listitem>

          <listitem>
            <para>MAC_KOREAN</para>
          </listitem>

          <listitem>
            <para>MAC_ROMAN</para>
          </listitem>

          <listitem>
            <para>MAC_TURKISH</para>
          </listitem>
        </itemizedlist>

        <para>afpd handles three different character set options:</para>

        <variablelist>
          <varlistentry>
            <term>unix charset<indexterm>
                <primary>unix charset</primary>

                <secondary>afpd's unix charset setting</secondary>
              </indexterm></term>

            <listitem>
              <para>This is the codepage used internally by your operating
              system. If not specified, it defaults to <option>UTF8</option>.
              If <option>LOCALE</option> is specified and your system support
              Unix locales, afpd tries to detect the codepage. afpd uses this
              codepage to read its configuration files, so you can use
              extended characters for volume names, login messages, etc. see
              <citerefentry>
                  <refentrytitle>afp.conf</refentrytitle>

                  <manvolnum>5</manvolnum>
                </citerefentry>.</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>mac charset<indexterm>
                <primary>mac charset</primary>

                <secondary>afpd's mac charset setting</secondary>
              </indexterm></term>

            <listitem>
              <para>As already mentioned, older Mac OS clients (up to AFP 2.2)
              use codepages to communicate with afpd. However, there is no
              support for negotiating the codepage used by the client in the
              AFP protocol. If not specified otherwise, afpd assumes the
              <emphasis>MacRoman</emphasis> codepage is used. In case you're
              clients use another codepage, e.g.
              <emphasis>MacCyrillic</emphasis>, you'll <emphasis
              role="bold">have</emphasis> to explicitly configure this. see
              <citerefentry>
                  <refentrytitle>afp.conf</refentrytitle>

                  <manvolnum>5</manvolnum>
                </citerefentry>.</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>vol charset<indexterm>
                <primary>vol charset</primary>

                <secondary>afpd's vol charset setting</secondary>
              </indexterm></term>

            <listitem>
              <para>This defines the charset afpd should use for filenames on
              disk. By default, it is the same as <option>unix
              charset</option>. If you have <ulink
              url="http://www.gnu.org/software/libiconv/">iconv</ulink><indexterm>
                  <primary>Iconv</primary>

                  <secondary>iconv encoding conversion engine</secondary>
                </indexterm> installed, you can use any iconv provided charset
              as well.</para>

              <para>afpd needs a way to preserve extended macintosh
              characters, or characters illegal in unix filenames, when saving
              files on a unix filesystem. Earlier versions used the the so
              called CAP encoding<indexterm>
                  <primary>CAP encoding</primary>

                  <secondary>CAP style character encoding</secondary>
                </indexterm>. An extended character (&gt;0x7F) would be
              converted to a :xx hex sequence, e.g. the Apple Logo (MacRoman:
              0xF0) was saved as :f0. Some special characters will be
              converted as to :xx notation as well. '/' will be encoded to
              :2f, if <option>usedots</option> was not specified, a leading
              dot '.' will be encoded as :2e.</para>

              <para>Even though this version now uses <option>UTF8</option> as
              the default encoding for filenames, '/' will be converted to
              ':'. For western users another useful setting could be
              <option>vol charset = ISO-8859-15</option>.</para>

              <para>If a character cannot be converted from the <option>mac
              charset</option> to the selected <option>vol charset</option>,
              you'll receive a -50 error on the mac.
              <emphasis>Note</emphasis>: Whenever you
              can, please stick with the default UTF8 volume format. see
              <citerefentry>
                  <refentrytitle>afp.conf</refentrytitle>

                  <manvolnum>5</manvolnum>
                </citerefentry>.</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </sect3>
    </sect2>

    <sect2 id="authentication">
      <title>Authentication<indexterm>
          <primary>Authentication</primary>

          <secondary>between AFP client and server</secondary>
        </indexterm></title>

      <sect3>
        <title>AFP authentication basics</title>

        <para>Apple chose a flexible model called "User Authentication
        Modules"<indexterm>
            <primary>UAM</primary>

            <secondary>User Authentication Module</secondary>
          </indexterm> (UAMs) for authentication purposes between AFP client
        and server. An AFP client initially connecting to an AFP server will
        ask for the list of UAMs which the server provides, and will choose
        the one with strongest encryption that the client supports.</para>

        <para>Several UAMs have been developed by Apple over the time, some by
        3rd-party developers.</para>
      </sect3>

      <sect3>
        <title>UAMs supported by Netatalk</title>

        <para>Netatalk supports the following ones by default:</para>

        <itemizedlist>
          <listitem>
            <para>"No User Authent"<indexterm>
                <primary>No User Authent</primary>

                <secondary>"No User Authent" UAM (guest access)</secondary>
              </indexterm> UAM (guest access without authentication)</para>
          </listitem>

          <listitem>
            <para>"Cleartxt Passwrd"<indexterm>
                <primary>Cleartxt Passwrd</primary>

                <secondary>"Cleartxt Passwrd" UAM</secondary>
              </indexterm> UAM (no password encryption)</para>
          </listitem>

          <listitem>
            <para>"Randnum exchange"<indexterm>
                <primary>Randnum exchange</primary>

                <secondary>"Randnum exchange" UAM</secondary>
              </indexterm>/"2-Way Randnum exchange"<indexterm>
                <primary>2-Way Randnum exchange</primary>

                <secondary>"2-Way Randnum exchange" UAM</secondary>
              </indexterm> UAMs (weak password encryption, separate password
            storage)</para>
          </listitem>

          <listitem>
            <para>"DHCAST128"<indexterm>
                <primary>DHCAST128</primary>

                <secondary>"DHCAST128" UAM</secondary>
              </indexterm> UAM (stronger password encryption)</para>
          </listitem>

          <listitem>
            <para>"DHX2"<indexterm>
                <primary>DHX2</primary>

                <secondary>"DHX2" UAM</secondary>
              </indexterm> UAM (successor of DHCAST128)</para>
          </listitem>
        </itemizedlist>

        <para>There exist other optional UAMs as well:</para>

        <itemizedlist>
          <listitem>
            <para>"PGPuam 1.0"<indexterm>
                <primary>PGPuam 1.0</primary>

                <secondary>"PGPuam 1.0" UAM</secondary>
              </indexterm><indexterm>
                <primary>uams_pgp.so</primary>

                <secondary>"PGPuam 1.0" UAM</secondary>
              </indexterm> UAM (PGP-based authentication for pre-Mac OS X
            clients. You'll also need the <ulink
            url="http://www.vmeng.com/vinnie/papers/pgpuam.html">PGPuam
            client</ulink> to let this work)</para>

            <para>You'll have to add <filename>"--enable-pgp-uam"</filename>
            to your configure switches to have this UAM available.</para>
          </listitem>

          <listitem>
            <para>"Kerberos IV"<indexterm>
                <primary>Kerberos IV</primary>

                <secondary>"Kerberos IV" UAM</secondary>
              </indexterm><indexterm>
                <primary>uams_krb4.so</primary>

                <secondary>"Kerberos IV" UAM</secondary>
              </indexterm>/"AFS Kerberos"<indexterm>
                <primary>AFS Kerberos</primary>

                <secondary>"AFS Kerberos" UAM (Kerberos IV)</secondary>
              </indexterm> UAMs (suitable to use <ulink
            url="http://web.mit.edu/macdev/KfM/Common/Documentation/faq.html">Kerberos
            v4 based authentication</ulink> and AFS file servers)</para>

            <para>Use <filename>"--enable-krb4-uam"</filename> at compile time
            to activate the build of this UAM.</para>
          </listitem>

          <listitem>
            <para>"Client Krb v2"<indexterm>
                <primary>Client Krb v2</primary>

                <secondary>"Client Krb v2" UAM (Kerberos V)</secondary>
              </indexterm> UAM (Kerberos V, suitable for "Single Sign On"
            Scenarios with OS X clients -- see below)</para>

            <para><filename>"--enable-krbV-uam"</filename> will provide you
            with the ability to use this UAM.</para>
          </listitem>
        </itemizedlist>

        <para>You can configure which UAMs should be activated by defining
        "<option>uam list</option>" in <option>Global</option> section.
        <command>afpd</command> will log which UAMs it's using and if problems
        occur while activating them in either
        <filename>netatalk.log</filename> or syslog at startup time.
        <citerefentry>
            <refentrytitle>asip-status.pl</refentrytitle>

            <manvolnum>1</manvolnum>
          </citerefentry> can be used to query the available UAMs of AFP
        servers as well.</para>

        <para>Having a specific UAM available at the server does not
        automatically mean that a client can use it. Client-side support is
        also necessary. For older Macintoshes running Mac OS &lt; X DHCAST128
        support exists since AppleShare client 3.8.x.</para>

        <para>On OS X, there exist some client-side techniques to make the
        AFP-client more verbose, so one can have a look what's happening while
        negotiating the UAMs to use. Compare with this <ulink
        url="http://article.gmane.org/gmane.network.netatalk.devel/7383/">hint</ulink>.</para>
      </sect3>

      <sect3>
        <title>Which UAMs to activate?</title>

        <para>It depends primarily on your needs and on the kind of Mac OS
        versions you have to support. Basically one should try to use
        DHCAST128 and DHX2 where possible because of its strength of password
        encryption.</para>

        <itemizedlist>
          <listitem>
            <para>Unless you really have to supply guest access to your
            server's volumes ensure that you disable "No User Authent" since
            it might lead accidentally to unauthorized access. In case you
            must enable guest access take care that you enforce this on a per
            volume base using the access controls.</para>
          </listitem>

          <listitem>
            <para>The "ClearTxt Passwrd" UAM is as bad as it sounds since
            passwords go unencrypted over the wire. Try to avoid it at both
            the server's side as well as on the client's. Note: If you want to
            provide Mac OS 8/9 clients with NetBoot-services then you need
            uams_cleartext.so since the AFP-client integrated into the Mac's
            firmware can only deal with this basic form of
            authentication.</para>
          </listitem>

          <listitem>
            <para>Since "Randnum exchange"/"2-Way Randnum exchange" uses only
            56 bit DES for encryption it should be avoided as well. Another
            disadvantage is the fact that the passwords have to be stored in
            cleartext on the server and that it doesn't integrate into both
            PAM scenarios or classic /etc/shadow (you have to administrate
            passwords separately by using the <citerefentry>
                <refentrytitle>afppasswd</refentrytitle>

                <manvolnum>1</manvolnum>
              </citerefentry> utility, if clients should use these
            UAMs)</para>
          </listitem>

          <listitem>
            <para>"DHCAST128" or "DHX2" should be a good compromise for most
            people since it combines stronger encryption with PAM
            integration.</para>
          </listitem>

          <listitem>
            <para>Using the Kerberos V<indexterm>
                <primary>Kerberos V</primary>

                <secondary>"Client Krb v2" UAM</secondary>
              </indexterm> ("Client Krb v2") UAM, it's possible to implement
            real single sign on scenarios using Kerberos tickets. The password
            is not sent over the network. Instead, the user password is used
            to decrypt a service ticket for the appleshare server. The service
            ticket contains an encryption key for the client and some
            encrypted data (which only the appleshare server can decrypt). The
            encrypted portion of the service ticket is sent to the server and
            used to authenticate the user. Because of the way that the afpd
            service principal detection is implemented, this authentication
            method is vulnerable to man-in-the-middle attacks.</para>
          </listitem>
        </itemizedlist>

        <para>For a more detailed overview over the technical implications of
        the different UAMs, please have a look at Apple's <ulink
        url="http://developer.apple.com/library/mac/#documentation/Networking/Conceptual/AFP/AFPSecurity/AFPSecurity.html#//apple_ref/doc/uid/TP40000854-CH232-SW1">File
        Server Security</ulink> pages.</para>
      </sect3>

      <sect3>
        <title>Using different authentication sources with specific
        UAMs</title>

        <para>Some UAMs provide the ability to use different authentication
        "backends", namely <filename>uams_cleartext.so</filename>,
        <filename>uams_dhx.so</filename> and
        <filename>uams_dhx2.so</filename>. They can use either classic Unix
        passwords from <filename>/etc/passwd</filename>
        (<filename>/etc/shadow</filename>) or PAM if the system supports that.
        <filename>uams_cleartext.so</filename> can be symlinked to either
        <filename>uams_passwd.so</filename> or
        <filename>uams_pam.so</filename>, <filename>uams_dhx.so</filename> to
        <filename>uams_dhx_passwd.so</filename> or
        <filename>uams_dhx_pam.so</filename> and
        <filename>uams_dhx2.so</filename> to
        <filename>uams_dhx2_passwd.so</filename> or
        <filename>uams_dhx2_pam.so</filename>.</para>

        <para>So, if it looks like this in Netatalk's UAMs folder (per default
        <filename>/etc/netatalk/uams/</filename>):<programlisting>uams_clrtxt.so -&gt; uams_pam.so
uams_dhx.so -&gt; uams_dhx_pam.so
uams_dhx2.so -&gt; uams_dhx2_pam.so</programlisting> then you're using PAM,
        otherwise classic Unix passwords. The main advantage of using PAM is
        that one can integrate Netatalk in centralized authentication
        scenarios, e.g. via LDAP, NIS and the like. Please always keep in mind
        that the protection of your user's login credentials in such scenarios
        also depends on the strength of encryption that the UAM in question
        supplies. So think about eliminating weak UAMs like "ClearTxt Passwrd"
        and "Randnum exchange" completely from your network.</para>
      </sect3>

      <sect3>
        <title>Netatalk UAM overview table</title>

        <para>A small overview of the most common used UAMs.</para>

        <table orient="land">
          <title>Netatalk UAM overview</title>

          <tgroup align="center" cols="7">
            <colspec colname="col1" colnum="1" colwidth="0.5*" />

            <colspec colname="uam_guest" colnum="2" colwidth="1*" />

            <colspec colname="uam_clrtxt" colnum="3" colwidth="1*" />

            <colspec colname="uam_randnum" colnum="4" colwidth="1*" />

            <colspec colname="uam_dhx" colnum="5" colwidth="1*" />

            <colspec colname="uam_dhx2" colnum="6" colwidth="1*" />

            <colspec colname="uam_gss" colnum="7" colwidth="1*" />

            <tbody>
              <row>
                <entry align="center" rotate="0" valign="middle">UAM</entry>

                <entry>No User Authent<indexterm>
                    <primary>uams_guest.so</primary>

                    <secondary>"No User Authent" UAM (guest
                    access)</secondary>
                  </indexterm></entry>

                <entry>Cleartxt Passwrd<indexterm>
                    <primary>uams_cleartxt.so</primary>

                    <secondary>"Cleartxt Passwrd" UAM</secondary>
                  </indexterm></entry>

                <entry>(2-Way) Randnum exchange<indexterm>
                    <primary>uams_randnum.so</primary>

                    <secondary>"(2-Way) Randnum exchange" UAM</secondary>
                  </indexterm></entry>

                <entry>DHCAST128<indexterm>
                    <primary>uams_dhx.so</primary>

                    <secondary>"DHCAST128" UAM</secondary>
                  </indexterm></entry>

                <entry>DHX2<indexterm>
                    <primary>uams_dhx2.so</primary>

                    <secondary>"DHX2" UAM</secondary>
                  </indexterm></entry>

                <entry>Client Krb v2<indexterm>
                    <primary>uams_gss.so</primary>

                    <secondary>"Client Krb v2" UAM (Kerberos V)</secondary>
                  </indexterm></entry>
              </row>

              <row>
                <entry align="center" rotate="0" valign="middle">pssword
                length</entry>

                <entry>guest access</entry>

                <entry>max. 8 characters</entry>

                <entry>max. 8 characters</entry>

                <entry>max. 64 characters</entry>

                <entry>max. 256 characters</entry>

                <entry>Kerberos tickets</entry>
              </row>

              <row>
                <entry align="center" rotate="0" valign="middle">Client
                support</entry>

                <entry>built-in into all Mac OS versions</entry>

                <entry>built-in in all Mac OS versions except 10.0. Has to be
                activated explicitly in recent Mac OS X versions</entry>

                <entry>built-in into almost all Mac OS versions</entry>

                <entry>built-in since AppleShare client 3.8.4, available as a
                plug-in for 3.8.3, integrated in Mac OS X' AFP client</entry>

                <entry>built-in since Mac OS X 10.2</entry>

                <entry>built-in since Mac OS X 10.2</entry>
              </row>

              <row>
                <entry align="center" rotate="0"
                valign="middle">Encryption</entry>

                <entry>Enables guest access without authentication between
                client and server.</entry>

                <entry>Password will be sent in cleartext over the wire. Just
                as bad as it sounds, therefore avoid at all if possible (note:
                providing NetBoot services requires the ClearTxt UAM)</entry>

                <entry>8-byte random numbers are sent over the wire,
                comparable with DES, 56 bits. Vulnerable to offline dictionary
                attack. Requires passwords in clear on the server.</entry>

                <entry>Password will be encrypted with 128 bit SSL, user will
                be authenticated against the server but not vice versa.
                Therefore weak against man-in-the-middle attacks.</entry>

                <entry>Password will be encrypted using libgcrypt with CAST
                128 in CBC mode. User will be authenticated against the server
                but not vice versa. Therefore weak against man-in-the-middle
                attacks.</entry>

                <entry>Password is not sent over the network. Due to the
                service principal detection method, this authentication method
                is vulnerable to man-in-the-middle attacks.</entry>
              </row>

              <row>
                <entry align="center" rotate="0" valign="middle">Server
                support</entry>

                <entry align="center" valign="middle">uams_guest.so</entry>

                <entry align="center" valign="middle">uams_cleartxt.so</entry>

                <entry align="center" valign="middle">uams_randnum.so</entry>

                <entry align="center" valign="middle">uams_dhx.so</entry>

                <entry align="center" valign="middle">uams_dhx2.so</entry>

                <entry align="center" valign="middle">uams_gss.so</entry>
              </row>

              <row>
                <entry align="center" rotate="0" valign="middle">Password
                storage method</entry>

                <entry align="center" valign="middle">None</entry>

                <entry align="center" valign="middle">Either /etc/passwd
                (/etc/shadow) or PAM</entry>

                <entry align="center" valign="middle">Passwords stored in
                clear text in a separate text file</entry>

                <entry align="center" valign="middle">Either /etc/passwd
                (/etc/shadow) or PAM</entry>

                <entry align="center" valign="middle">Either /etc/passwd
                (/etc/shadow) or PAM</entry>

                <entry align="center" valign="middle">At the Kerberos Key
                Distribution Center*</entry>
              </row>
            </tbody>
          </tgroup>
        </table>

        <para>* Have a look at this <ulink
        url="http://cryptnet.net/fdp/admin/kerby-infra/en/kerby-infra.html">Kerberos
        overview</ulink></para>
      </sect3>

      <sect3 id="sshtunnel">
        <title>SSH tunneling</title>

        <para>Tunneling and all sort of VPN stuff has nothing to do with AFP
        authentication and UAMs in general. But since Apple introduced an
        option called "Allow Secure Connections Using SSH" and many people
        tend to confuse both things, we'll speak about that here too.</para>

        <sect4 id="manualsshtunnel">
          <title>Manually tunneling an AFP session</title>

          <para>This works since the first AFP servers that spoke "AFP over
          TCP" appeared in networks. One simply tunnels the remote server's
          AFP port to a local port different than 548 and connects locally to
          this port afterwards. On OS X this can be done by</para>

          <programlisting>ssh -l $USER $SERVER -L 10548:127.0.0.1:548 sleep 3000</programlisting>

          <para>After establishing the tunnel one will use
          <filename>"afp://127.0.0.1:10548"</filename> in the "Connect to
          server" dialog. All AFP traffic including the initial connection
          attempts will be sent encrypted over the wire since the local AFP
          client will connect to the Mac's local port 10548 which will be
          forwarded to the remote server's AFP port (we used the default 548)
          over SSH.</para>

          <para>These sorts of tunnels are an ideal solution if you've to
          access an AFP server providing weak authentications mechanisms
          through the Internet without having the ability to use a "real" VPN.
          Note that you can let <command>ssh</command> compress the data by
          using its "-C" switch and that the tunnel endpoints can be different
          from both AFP client and server (compare with the SSH documentation
          for details).</para>
        </sect4>

        <sect4 id="autosshtunnel">
          <title>Automatically establishing a tunneled AFP connection</title>

          <para>From Mac OS X 10.2 to 10.4, Apple added an "Allow Secure
          Connections Using SSH" checkbox to the "Connect to Server" dialog.
          The idea behind: When the server signals that it can be contacted by
          SSH then Mac OS X' AFP client tries to establish the tunnel and
          automagically sends all AFP traffic through it.</para>

          <para>But it took until the release of Mac OS X 10.3 that this
          feature worked the first time... partly. In case, the SSH tunnel
          can't be established the AFP client <emphasis
          role="strong">silently</emphasis> fell back to an unencrypted AFP
          connection attempt.</para>

          <para>Netatalk's afpd will report that it is capable of handling SSH
          tunneled AFP requests, when both "<option>advertise ssh</option>"
          and "<option>fqdn</option>" options are set in
          <option>Global</option> section (double check with <citerefentry>
              <refentrytitle>asip-status.pl</refentrytitle>

              <manvolnum>1</manvolnum>
            </citerefentry> after you restarted afpd when you made changes to
          the settings). But there are a couple of reasons why you don't want
          to use this option at all:</para>

          <itemizedlist>
            <listitem>
              <para>Tunneling TCP over TCP (as SSH does) is not the best idea.
              There exist better solutions like VPNs based on the IP
              layer.</para>
            </listitem>

            <listitem>
              <para>Since this SSH kludge isn't a normal UAM that integrates
              directly into the AFP authentication mechanisms but instead uses
              a single flag signalling clients whether they can <emphasis
              role="strong">try</emphasis> to establish a tunnel or not, it
              makes life harder to see what's happening when things go
              wrong.</para>
            </listitem>

            <listitem>
              <para>You cannot control which machines are logged on by
              Netatalk tools like a <command>macusers</command> since all
              connection attempts seem to be made from localhost.</para>
            </listitem>

            <listitem>
              <para>On the other side you've to limit access to afpd to
              localhost only (TCP wrappers) when you want to ensure that all
              AFP sessions are SSH encrypted or...</para>
            </listitem>

            <listitem>
              <para>...when you're using 10.2 - 10.3.3 then you get the
              opposite of what you'd expect: potentially unencrypted AFP
              communication (including logon credentials) on the network
              without a single notification that establishing the tunnel
              failed. Apple fixed that not until Mac OS X 10.3.4.</para>
            </listitem>

            <listitem>
              <para>Encrypting all AFP sessions via SSH can lead to a
              significantly higher load on the Netatalk server</para>
            </listitem>
          </itemizedlist>
        </sect4>
      </sect3>
    </sect2>

    <sect2 id="acls">
      <title>ACL Support<indexterm>
          <primary>ACLs</primary>
        </indexterm></title>

      <para>ACL support for AFP is implemented for ZFS ACLs on Solaris and
      derived platforms and for POSIX 1e ACLs on Linux.</para>

      <sect3>
        <title>Configuration</title>

        <para>For a basic mode of operation there's nothing to configure.
        Netatalk reads ACLs on the fly and calculates effective permissions
        which are then send to the AFP client via the so called
        UARights<indexterm>
            <primary>UARights</primary>
          </indexterm> permission bits. On a Mac, the Finder uses these bits
          to adjust permission in Finder windows. Example: a folder whose
          UNIX mode is read-only and an ACL giving the user write access,
          will display the effective read-write permission. Without the
          permission mapping the Finder would display a read-only icon and
          the user wouldn't be able to write to the folder.</para>

        <para>By default, the effective permission of the authenticated user
        are only mapped to the mentioned UARights<indexterm>
            <primary>UARights</primary>
          </indexterm>permission structure, not the UNIX mode. You can adjust
        this behaviour with the configuration option <link
        linkend="map_acls">map acls</link>.</para>

        <para>However, neither in Finder "Get Info" windows nor in Terminal
        will you be able to see the ACLs, that's a result of how ACLs in OS X
        are designed. If you want to be able to display ACLs on the client,
        things get more involved as you must then setup both client and server
        to be part on a authentication domain (directory service, e.g. LDAP,
        OpenDirectory). The reason is, that in OS X ACLs are bound to UUIDs,
        not just uid's or gid's. Therefore afpd must be able to map every
        filesystem uid and gid to a UUID so that it can return the server side
        ACLs which are bound to UNIX uid and gid mapped to OS X UUIDs.</para>

        <para>Netatalk can query a directory server using LDAP queries. Either
        the directory server already provides an UUID attribute for user and
        groups (Active Directory, Open Directory) or you reuse an unused
        attribute (or add a new one) to you directory server (eg
        OpenLDAP).</para>

        <para>In detail:</para>

        <orderedlist>
          <listitem>
            <para>For Solaris/ZFS: ZFS Volumes</para>

            <para>You should configure a ZFS ACL know for any volume you want
            to use with Netatalk:</para>

            <screen>aclinherit = passthrough
aclmode = passthrough</screen>

            <para>For an explanation of what this knob does and how to apply
            it, check your hosts ZFS documentation (eg man zfs).</para>
          </listitem>

          <listitem>
            <para>Authentication Domain</para>

            <para>Your server and the clients must be part of a security
            association where identity data is coming from a common source.
            ACLs in Darwin are based on UUIDs and so is the ACL specification
            in AFP 3.2. Therefore your source of identity data has to provide
            an attribute for every user and group where a UUID is stored as a
            ASCII string. In other words:</para>

            <itemizedlist>
              <listitem>
                <para>you need an Open Directory Server or an LDAP server
                where you store UUIDs in some attribute</para>
              </listitem>

              <listitem>
                <para>your clients must be configured to use this
                server</para>
              </listitem>

              <listitem>
                <para>your server should be configured to use this server via
                nsswitch and PAM</para>
              </listitem>

              <listitem>
                <para>configure Netatalk via the special <link
                linkend="acl_options">LDAP options for ACLs</link> in <link
                linkend="afp.conf.5">afp.conf</link> so that Netatalk is able
                to retrieve the UUID for users and groups via LDAP search
                queries</para>
              </listitem>
            </itemizedlist>
          </listitem>
        </orderedlist>
      </sect3>

      <sect3>
        <title>OS X ACLs</title>

        <para>With Access Control Lists (ACLs) Mac OS X offers a powerful
        extension of the traditional UNIX permissions model. An ACL is an
        ordered list of Access Control Entries (ACEs) explicitly granting or
        denying a set of permissions to a given user or group.</para>

        <para>Unlike UNIX permissions, which are bound to user or group IDs,
        ACLs are tied to UUIDs. For this reason accessing an object's ACL
        requires server and client to use a common directory service which
        translates between UUIDs and user/group IDs.</para>

        <para>ACLs and UNIX permissions interact in a rather simple way. As
        ACLs are optional UNIX permissions act as a default mechanism for
        access control. Changing an objects's UNIX permissions will leave it's
        ACL intact and modifying an ACL will never change the object's UNIX
        permissions. While doing access checks, OS X first examines an
        object's ACL evaluating ACEs in order until all requested rights have
        been granted, a requested right has been explicitly denied by an ACE
        or the end of the list has been reached. In case there is no ACL or
        the permissions granted by the ACL are not sufficient to fulfill the
        request, OS X next evaluates the object's UNIX permissions. Therefore
        ACLs always have precedence over UNIX permissions.</para>
      </sect3>

      <sect3>
        <title>ZFS ACLs</title>

        <para>ZFS ACLs closely match OS X ACLs. Both offer mostly identical
        fine grained permissions and inheritance settings.</para>
      </sect3>

      <sect3>
        <title>POSIX ACLs</title>

        <sect4>
          <title>Overview</title>

          <para>Compared to OS X or NFSv4 ACLs, Posix ACLs represent a
          different, less versatile approach to overcome the limitations of
          the traditional UNIX permissions. Implementations are based on the
          withdrawn Posix 1003.1e standard.</para>

          <para>The standard defines two types of ACLs. Files and directories
          can have access ACLs which are consulted for access checks.
          Directories can also have default ACLs irrelevant to access checks.
          When a new object is created inside a directory with a default ACL,
          the default ACL is applied to the new object as it's access ACL.
          Subdirectories inherit default ACLs from their parent. There are no
          further mechanisms of inheritance control.</para>

          <para>Architectural differences between Posix ACLs and OS X ACLs
          especially involve:</para>

          <para><itemizedlist>
              <listitem>
                <para>No fine-granular permissions model. Like UNIX
                permissions Posix ACLs only differentiate between read, write
                and execute permissions.</para>
              </listitem>

              <listitem>
                <para>Entries within an ACL are unordered.</para>
              </listitem>

              <listitem>
                <para>Posix ACLs can only grant rights. There is no way to
                explicitly deny rights by an entry.</para>
              </listitem>

              <listitem>
                <para>UNIX permissions are integrated into an ACL as special
                entries.</para>
              </listitem>
            </itemizedlist></para>

          <para>Posix 1003.1e defines 6 different types of ACL entries. The
          first three types are used to integrate standard UNIX permissions.
          They form a minimal ACL, their presence is mandatory and only one
          entry of each type is allowed within an ACL.</para>

          <para><itemizedlist>
              <listitem>
                <para>ACL_USER_OBJ: the owner's access rights.</para>
              </listitem>

              <listitem>
                <para>ACL_GROUP_OBJ: the owning group's access rights.</para>
              </listitem>

              <listitem>
                <para>ACL_OTHER: everybody's access rights.</para>
              </listitem>
            </itemizedlist></para>

          <para>The remaining entry types expand the traditional permissions
          model:</para>

          <para><itemizedlist>
              <listitem>
                <para>ACL_USER: grants access rights to a certain user.</para>
              </listitem>

              <listitem>
                <para>ACL_GROUP: grants access rights to a certain
                group.</para>
              </listitem>

              <listitem>
                <para>ACL_MASK: limits the maximum access rights which can be
                granted by entries of type ACL_GROUP_OBJ, ACL_USER and
                ACL_GROUP. As the name suggests, this entry acts as a mask.
                Only one ACL_MASK entry is allowed per ACL. If an ACL contains
                ACL_USER or ACL_GROUP entries, an ACL_MASK entry must be
                present too, otherwise it is optional.</para>
              </listitem>
            </itemizedlist></para>

          <para>In order to maintain compatibility with applications not aware
          of ACLs, Posix 1003.1e changes the semantics of system calls and
          utilities which retrieve or manipulate an objects UNIX permissions.
          In case an object only has a minimal ACL, the group permissions bits
          of the UNIX permissions correspond to the value of the ACL_GROUP_OBJ
          entry.</para>

          <para>However, if the ACL also contains an ACL_MASK entry, the
          behavior of those system calls and utilities is different. The group
          permissions bits of the UNIX permissions correspond to the value of
          the ACL_MASK entry, i. e. calling "chmod g-w" will not only revoke
          write access for the group, but for all entities which have been
          granted write access by ACL_USER or ACL_GROUP entries.</para>
        </sect4>

        <sect4>
          <title>Mapping POSIX ACLs to OS X ACLs</title>

          <para>When a client wants to read an object's ACL, afpd maps it's
          Posix ACL onto an equivalent OS X ACL. Writing an object's ACL
          requires afpd to map an OS X ACL onto a Posix ACL. Due to
          architectural restrictions of Posix ACLs, it is usually impossible
          to find an exact mapping so that the result of the mapping process
          will be an approximation of the original ACL's semantic.</para>

          <para><itemizedlist>
              <listitem>
                <para>afpd silently discard entries which deny a set of
                permissions because they they can't be represented within the
                Posix architecture.</para>
              </listitem>

              <listitem>
                <para>As entries within Posix ACLs are unordered, it is
                impossible to preserve order.</para>
              </listitem>

              <listitem>
                <para>Inheritance control is subject to severe limitations as
                well:<itemizedlist>
                    <listitem>
                      <para>Entries with the only_inherit flag set will only
                      become part of the directory's default ACL.</para>
                    </listitem>

                    <listitem>
                      <para>Entries with at least one of the flags
                      file_inherit, directory_inherit or limit_inherit set,
                      will become part of the directory's access and default
                      ACL, but the restrictions they impose on inheritance
                      will be ignored.</para>
                    </listitem>
                  </itemizedlist></para>
              </listitem>

              <listitem>
                <para>The lack of a fine-granular permission model on the
                Posix side will normally result in an increase of granted
                permissions.</para>
              </listitem>
            </itemizedlist></para>

          <para>As OS X clients aren't aware of the Posix 1003.1e specific
          relationship between UNIX permissions and ACL_MASK, afpd does not
          expose this feature to the client to avoid compatibility issues and
          handles *unix permissions and ACLs the same way as Apple's reference
          implementation of AFP does. When an object's UNIX permissions are
          requested, afpd calculates proper group rights and returns the
          result together with the owner's and everybody's access rights to
          the caller via "permissions" and "ua_permissions" members of the
          FPUnixPrivs structure (see Apple Filing Protocol Reference, page
          181). Changing an object's permissions, afpd always updates
          ACL_USER_OBJ, ACL_GROUP_OBJ and ACL_OTHERS. If an ACL_MASK entry is
          present too, afpd recalculates it's value so that the new group
          rights become effective and existing entries of type ACL_USER or
          ACL_GROUP stay intact.</para>
        </sect4>
      </sect3>
    </sect2>

    <sect2 id="fce">
      <title>Filesystem Change Events<indexterm>
          <primary>FCE</primary>
        </indexterm></title>

      <para>Netatalk includes a nifty filesystem change event mechanism where
      afpd processes notfiy interested listeners about certain filesystem
      event by UDP network datagrams.</para>

      <para>For the format of the UDP packets and for an example C application
      that demonstrates how to use these in a listener, take a look at the
      Netatalk sourcefile <filename>bin/misc/fce.c</filename>.</para>

      <para>The currently supported FCE events are<itemizedlist>
          <listitem>
            <para>file modification (fmod)</para>
          </listitem>

          <listitem>
            <para>file deletion (fdel)</para>
          </listitem>

          <listitem>
            <para>directory deletion (ddel)</para>
          </listitem>

          <listitem>
            <para>file creation (fcre)</para>
          </listitem>

          <listitem>
            <para>directory deletion (ddel)</para>
          </listitem>
        </itemizedlist></para>

      <para>For details on the available simple configuration options take a
      look at <filename><link
      linkend="fceconf">afp.conf</link></filename>.</para>
    </sect2>
  </sect1>

  <sect1>
    <title id="spotlight">Spotlight<indexterm>
        <primary>Spotlight</primary>
      </indexterm></title>

    <para>Starting with version 3.1 Netatalk supports Spotlight searching.
    Netatalk uses Gnome <ulink url="https://projects.gnome.org/tracker/">Tracker</ulink> as metadata store,
    indexer and search engine.</para>

    <sect2>
      <title>Configuration</title>

      <para>You can enable Spotlight and indexing either globally or on a per
      volume basis with the <option>spotlight</option> option.</para>

      <warning>
        <para>Once Spotlight is enable for a single volume, all other volumes
        for which spotlight is disabled won't be searchable at all.</para>
      </warning>

      <para>The <command>dbus-daemon</command> binary has to be installed for
      Spotlight feature. The path to dbus-daemon is determined by --with-dbus-daemon
      option to "configure".</para>

      <para>In case the <command>dbus-daemon</command> binary is installed
      at the other path, you must use the
      global option <option>dbus daemon</option> to point to the path, e.g. for
      Solaris with Tracker from OpenCSW: <screen>dbus daemon = /opt/csw/bin/dbus-daemon</screen></para>
    </sect2>

    <sect2>
      <title>Limitations and notes</title>

      <itemizedlist>
        <listitem>
          <para>Large filesystems</para>

          <para>Tracker on Linux uses the inotify Kernel filesystem change
          event API for tracking filesystem changes. On large filesystems this
          may be problematic since the inotify API doesn't offer recursive
          directory watches but instead requires that for every subdirectoy
          watches must be added individually.</para>

          <para>On Solaris the FEN file event notification system is used. It
          is unknown which limitations and resource consumption this Solaris
          subsystem may have.</para>

          <para>We therefore recommend to disable live filesystem monitoring
          and let Tracker periodically scan filesystems for changes instead,
          see the Tracker configuration options <link
          linkend="enable-monitors">enable-monitors</link> and <link
          linkend="crawling-interval">crawling-interval</link> below.</para>
        </listitem>
      </itemizedlist>
    </sect2>

    <sect2>
      <title>Using Tracker commandline tools on the server</title>

      <para>Netatalk must be running, commands must be executed as root and
      some environment variables must be set up (adjust PREFIX to point to
      the base directory Netatalk in installed to):<screen>$ su
# cat .tracker_profile
PREFIX="/"
export XDG_DATA_HOME="$PREFIX/var/lib/netatalk/"
export XDG_CACHE_HOME="$PREFIX/var/lib/netatalk/"
export DBUS_SESSION_BUS_ADDRESS="unix:path=$PREFIX/var/lib/netatalk/spotlight.ipc"
# . .tracker_profile
#
</screen></para>

      <para>When using Tracker from OpenCSW you must also update your
      PATH:<screen># export PATH=/opt/csw/bin:$PATH</screen></para>

      <sect3>
        <title>Querying Tracker status</title>

        <variablelist>
          <varlistentry>
            <term>Recent Tracker:</term>
            <listitem>
              <screen># tracker daemon</screen>
            </listitem>
          </varlistentry>

          <varlistentry>
          <term>Old Tracker:</term>
          <listitem>
            <screen># tracker-control -S</screen>
          </listitem>
          </varlistentry>
        </variablelist>
      </sect3>

      <sect3>
        <title>Stop Tracker</title>

        <variablelist>
          <varlistentry>
            <term>Recent Tracker:</term>
            <listitem>
              <screen># tracker daemon -t</screen>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>Old Tracker:</term>
            <listitem>
              <screen># tracker-control -t</screen>
            </listitem>
          </varlistentry>
        </variablelist>
      </sect3>

      <sect3>
        <title>Start Tracker</title>

        <variablelist>
          <varlistentry>
            <term>Recent Tracker:</term>
            <listitem>
              <screen># tracker daemon -s</screen>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>Old Tracker:</term>
            <listitem>
              <screen># tracker-control -s</screen>
            </listitem>
          </varlistentry>
        </variablelist>
      </sect3>

      <sect3>
        <title>Reindex directory</title>

        <variablelist>
          <varlistentry>
            <term>Recent Tracker:</term>
            <listitem>
              <screen># tracker index -f PATH</screen>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>Old Tracker:</term>
            <listitem>
              <screen># tracker-control -f PATH</screen>
            </listitem>
          </varlistentry>
        </variablelist>
        </sect3>

      <sect3>
        <title>Query Tracker for information about a file or directory</title>

        <variablelist>
          <varlistentry>
            <term>Recent Tracker:</term>
            <listitem>
              <screen># tracker info PATH</screen>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>Old Tracker:</term>
            <listitem>
              <screen># tracker-info PATH</screen>
            </listitem>
          </varlistentry>
        </variablelist>
        </sect3>

      <sect3>
        <title>Search Tracker</title>

        <variablelist>
          <varlistentry>
            <term>Recent Tracker:</term>
            <listitem>
              <screen># tracker search QUERY</screen>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term>Old Tracker:</term>
            <listitem>
              <screen># tracker-search QUERY</screen>
            </listitem>
          </varlistentry>
        </variablelist>

        </sect3>
    </sect2>

    <sect2>
      <title>Advanced Tracker command line configuration</title>

      <para>Tracker stores its configuration via Gnome dconf backend which can
      be modified with the command <command>gsettings</command>.</para>

      <para>Gnome dconf settings are per-user settings, so, as Netatalk runs
      the Tracker processes as root, the settings are stored in the root user
      context and reading or changing these settings must be performed as root
      and Netatalk must be running (and again the environment must be set up
      as shown above).</para>

      <para><screen># gsettings list-recursively | grep Tracker
org.freedesktop.Tracker.Writeback verbosity 'debug'
...</screen></para>

      <para>The following list describes some important Tracker options and
      their default settings.</para>

      <variablelist>
        <varlistentry>
          <term>org.freedesktop.Tracker.Miner.Files
          index-recursive-directories</term>

          <listitem>
            <para>This option controls which directories Tracker will index.
            Don't change this option manually as it is automatically set by
            Netatalk reflecting the setting of the <option>Spotlight</option>
            option of Netatalk volumes.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term id="enable-monitors">org.freedesktop.Tracker.Miner.Files
          enable-monitors <parameter> true</parameter></term>

          <listitem>
            <para>The value controls whether Tracker watches all configured
            paths for modification. Depending on the filesystem modification
            backend (FAM on Linux, FEN on Solaris), this feature may not work
            as reliable as one might wish, so it may be safer to disable it
            and instead rely on periodic crawling of Tracker itself. See aslo
            the option <option>crawling-interval </option>.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term id="crawling-interval">org.freedesktop.Tracker.Miner.Files
          crawling-interval <parameter>-1</parameter></term>

          <listitem>
            <para>Interval in days to check the filesystem is up to date in
            the database, maximum is 365, default is -1. -2 = crawling is
            disabled entirely, -1 = crawling *may* occur on startup (if not
            cleanly shutdown), 0 = crawling is forced</para>
          </listitem>
        </varlistentry>
      </variablelist>
    </sect2>

    <sect2>
      <title>Supported metadata attributes</title>

      <para>The following table lists the supported Spotlight metadata
      attributes</para>

      <table>
        <title>Supported Spotlight metadata attributes</title>

        <tgroup cols="2">
          <thead>
            <row>
              <entry align="center">Description</entry>

              <entry align="center">Spotlight Key</entry>
            </row>
          </thead>

          <tbody>
            <row>
              <entry>Name</entry>

              <entry>kMDItemDisplayName, kMDItemFSName</entry>
            </row>

            <row>
              <entry>Document content (full text search)</entry>

              <entry>kMDItemTextContent</entry>
            </row>

            <row>
              <entry>File type</entry>

              <entry>_kMDItemGroupId, kMDItemContentTypeTree</entry>
            </row>

            <row>
              <entry>File modification date</entry>

              <entry>kMDItemFSContentChangeDate,
              kMDItemContentModificationDate,
              kMDItemAttributeChangeDate</entry>
            </row>

            <row>
              <entry>Content Creation date</entry>

              <entry>kMDItemContentCreationDate</entry>
            </row>

            <row>
              <entry>The author, or authors, of the contents of the
              file</entry>

              <entry>kMDItemAuthors, kMDItemCreator</entry>
            </row>

            <row>
              <entry>The name of the country where the item was
              created</entry>

              <entry>kMDItemCountry</entry>
            </row>

            <row>
              <entry>Duration</entry>

              <entry>kMDItemDurationSeconds</entry>
            </row>

            <row>
              <entry>Number of pages</entry>

              <entry>kMDItemNumberOfPages</entry>
            </row>

            <row>
              <entry>Document title</entry>

              <entry>kMDItemTitle</entry>
            </row>

            <row>
              <entry>The width, in pixels, of the contents. For example, the
              image width or the video frame width</entry>

              <entry>kMDItemPixelWidth</entry>
            </row>

            <row>
              <entry>The height, in pixels, of the contents. For example, the
              image height or the video frame height</entry>

              <entry>kMDItemPixelHeight</entry>
            </row>

            <row>
              <entry>The color space model used by the document
              contents</entry>

              <entry>kMDItemColorSpace</entry>
            </row>

            <row>
              <entry>The number of bits per sample</entry>

              <entry>kMDItemBitsPerSample</entry>
            </row>

            <row>
              <entry>Focal length of the lens, in millimeters</entry>

              <entry>kMDItemFocalLength</entry>
            </row>

            <row>
              <entry>ISO speed</entry>

              <entry>kMDItemISOSpeed</entry>
            </row>

            <row>
              <entry>Orientation of the document. Possible values are 0
              (landscape) and 1 (portrait)</entry>

              <entry>kMDItemOrientation</entry>
            </row>

            <row>
              <entry>Resolution width, in DPI</entry>

              <entry>kMDItemResolutionWidthDPI</entry>
            </row>

            <row>
              <entry>Resolution height, in DPI</entry>

              <entry>kMDItemResolutionHeightDPI</entry>
            </row>

            <row>
              <entry>Exposure time, in seconds</entry>

              <entry>kMDItemExposureTimeSeconds</entry>
            </row>

            <row>
              <entry>The composer of the music contained in the audio
              file</entry>

              <entry>kMDItemComposer</entry>
            </row>

            <row>
              <entry>The musical genre of the song or composition</entry>

              <entry>kMDItemMusicalGenre</entry>
            </row>
          </tbody>
        </tgroup>
      </table>

    </sect2>

    <sect2>
      <title>References</title>

      <orderedlist>
        <listitem>
          <para><ulink
          url="https://developer.apple.com/library/mac/#documentation/Carbon/Reference/MDItemRef/Reference/reference.html">MDItem</ulink></para>
        </listitem>

        <listitem>
          <para><ulink
          url="https://live.gnome.org/Tracker/Documentation">Tracker</ulink></para>
        </listitem>
      </orderedlist>
    </sect2>
  </sect1>

  <sect1>
    <title>Starting and stopping Netatalk</title>

    <para>The Netatalk distribution comes with several operating system
    specific startup script templates that are tailored according to the
    options given to the "configure" script before compiling. Currently,
    templates are provided for RedHat (sysv style), RedHat (systemd style),
    SUSE (sysv style), SUSE (systemd style), Debian (sysv style), Debian
    (systemd style), Gentoo, NetBSD and Solaris. You can select to install
    the generated startup script(s)
    <indexterm>
        <primary>Startscript</primary>

        <secondary>startup script</secondary>
      </indexterm> by specifying a system type to "configure". To
    automatically install startup scripts give one of the available
    <option>--with-init-style</option> option to "configure".</para>

    <para>Since new releases of Linux distributions appear all the time and
    the startup procedure for the other systems mentioned above might change
    as well, it is probably a good idea to not blindly install a startup
    script but to look at it first to see if it will work on your system. If
    you use Netatalk as part of a fixed setup, like a Linux distribution, an
    RPM or a BSD package, things will probably have been arranged properly for
    you. The following therefore applies mostly for people who have compiled
    Netatalk themselves.</para>

    <para>The following daemon need to be started by whatever startup script
    mechanism is used:</para>

    <itemizedlist>
      <listitem>
        <para>netatalk<indexterm>
            <primary>netatalk</primary>
          </indexterm></para>
      </listitem>
    </itemizedlist>

    <para>Additionally, make sure that the configuration file
    <filename>afp.conf</filename> is in the right place.</para>
  </sect1>
</chapter>