]> arthur.barton.de Git - netatalk.git/blob - man/man5/AppleVolumes.default.5.tmpl
Last manpage checkin from XML sources before 2.1beta1 release
[netatalk.git] / man / man5 / AppleVolumes.default.5.tmpl
1 '\" t
2 .\"     Title: AppleVolumes.default
3 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4 .\" Generator: DocBook XSL Stylesheets v1.74.3 <http://docbook.sf.net/>
5 .\"      Date: 23 Dec 2009
6 .\"    Manual: Netatalk 2.1
7 .\"    Source: Netatalk 2.1
8 .\"  Language: English
9 .\"
10 .TH "APPLEVOLUMES\&.DEFAU" "5" "23 Dec 2009" "Netatalk 2.1" "Netatalk 2.1"
11 .\" -----------------------------------------------------------------
12 .\" * set default formatting
13 .\" -----------------------------------------------------------------
14 .\" disable hyphenation
15 .nh
16 .\" disable justification (adjust text to left margin only)
17 .ad l
18 .\" -----------------------------------------------------------------
19 .\" * MAIN CONTENT STARTS HERE *
20 .\" -----------------------------------------------------------------
21 .SH "NAME"
22 AppleVolumes.default \- Configuration file used by \fBafpd\fR(8) to determine the shares made available through Appletalk
23 .SH "DESCRIPTION"
24 .PP
25 :ETCDIR:/AppleVolumes\&.default
26 is the configuration file used by
27 \fBafpd\fR
28 to determine what portions of the file system will be shared via Apple Filing Protocol, as well as their behaviour\&. Any line not prefixed with # is interpreted\&. Newline escaping is supported\&. The configuration lines are composed like:
29 .PP
30 path
31 \fI[ volume name ] [ options ]\fR
32 .PP
33 The path name must be a fully qualified path name, or a path name using either the ~ shell shorthand or any of the substitution variables, which are listed below\&.
34 .PP
35 The volume name is the name that appears in the Chooser ot the "connect to server" dialog on Macintoshes to represent the appropriate share\&. If there are spaces in the name, it should be in quotes (i\&.e\&. "File Share")\&. The volume name may not exceed 27 characters in length, and cannot contain the
36 \':\'
37 character\&.
38 .if n \{\
39 .sp
40 .\}
41 .RS 4
42 .it 1 an-trap
43 .nr an-no-space-flag 1
44 .nr an-break-flag 1
45 .br
46 .ps +1
47 \fBNote\fR
48 .ps -1
49 .br
50 .PP
51 Each volume has to be configured on a
52 \fBsingle\fR
53 line\&. Though newline escaping is supported\&.
54 .sp .5v
55 .RE
56 .PP
57 It is possible to specify default options for all volumes with a
58 \fI:DEFAULT: \fRline preceeding these volume definitions:.PP \fBExample.\ \&:DEFAULT: configuration line\fR .PP :DEFAULT: options:upriv,usedots dbpath:/var/dbd/AppleDB/$v dperm:0775 fperm:0664
59 .PP
60 The possible options and their meanings are:
61 .PP
62 adouble:\fI[v1|v2|osx]\fR
63 .RS 4
64 Specify the format of the metadata files, which are used for saving Mac resource fork as well\&. Earlier versions used AppleDouble V1, the new default format is V2\&. Starting with Netatalk 2\&.0, the scheme MacOS X uses currently (10\&.3\&.x), is also supported
65 .if n \{\
66 .sp
67 .\}
68 .RS 4
69 .it 1 an-trap
70 .nr an-no-space-flag 1
71 .nr an-break-flag 1
72 .br
73 .ps +1
74 \fBNote\fR
75 .ps -1
76 .br
77 Using
78 \fBadouble:osx\fR
79 is
80 \fBnot\fR
81 recommended for production use\&. Its only aim is to temporarely share eg\&. FAT32 formatted FireWire harddrives written on a Macintosh with afpd\&. Apple\'s metadata scheme lacks several essential features, so using it on the server\'s side will break both CNIDs and MacOS 9 compatibility
82 .sp .5v
83 .RE
84 .RE
85 .PP
86 allow:\fI[users/groups]\fR
87 .RS 4
88 The allow option allows the users and groups that access a share to be specified\&. Users and groups are specified, delimited by commas\&. Groups are designated by a @ prefix\&. Example: allow:user1,user2,@group
89 .RE
90 .PP
91 deny:\fI[users/groups]\fR
92 .RS 4
93 The deny option specifies users and groups who are not allowed access to the share\&. It follows the same format as the allow option\&.
94 .RE
95 .PP
96 allowed_hosts:\fI[IP host address/IP netmask bits[, \&.\&.\&. ]]\fR
97 .RS 4
98 Only listed hosts and networks are allowed, all others are rejected\&. The network address may be specified either in dotted\-decimal format for IPv4 or in hexadecimal format for IPv6\&.
99 .sp
100 Example: allowed_hosts:10\&.1\&.0\&.0/16,10\&.2\&.1\&.100,2001:0db8:1234::/48
101 .RE
102 .PP
103 denied_hosts:\fI[IP host address/IP netmask bits[, \&.\&.\&.]]\fR
104 .RS 4
105 Listed hosts and nets are rejected, all others are allowed\&.
106 .sp
107 Example: denied_hosts: 192\&.168\&.100/24,10\&.1\&.1\&.1,2001:db8::1428:57ab
108 .RE
109 .PP
110 cnidscheme:\fI[backend]\fR
111 .RS 4
112 set the CNID backend to be used for the volume, default is [:DEFAULT_CNID_SCHEME:] available schemes: [:COMPILED_BACKENDS:]
113 .RE
114 .PP
115 dbpath:\fI[path]\fR
116 .RS 4
117 Sets the database information to be stored in path\&. You have to specifiy a writable location, even if the volume is read only\&.
118 .RE
119 .PP
120 ea:\fI[none|auto|sys|ad]\fR
121 .RS 4
122 Specify how Extended Attributes
123 are stored\&.
124 \fBauto\fR
125 is the default\&.
126 .PP
127 auto
128 .RS 4
129 Try
130 \fBsys\fR
131 (by setting an EA on the shared directory itself), fallback to
132 \fBad\fR\&. Requires writeable volume for perfoming test\&.
133 \fBoptions:ro\fR
134 overwrites
135 \fBauto\fR
136 with
137 \fBnone\fR\&. Use explicit
138 \fBea:sys|ad\fR
139 for read\-only volumes where appropiate\&.
140 .RE
141 .PP
142 sys
143 .RS 4
144 Use filesystem Extended Attributes\&.
145 .RE
146 .PP
147 ad
148 .RS 4
149 Use files in
150 \fIAppleDouble\fR
151 directories\&.
152 .RE
153 .PP
154 none
155 .RS 4
156 No Extended Attributes support\&.
157 .RE
158 .RE
159 .PP
160 maccharset:\fI[charset]\fR
161 .RS 4
162 specifies the mac client codepage for this Volume, e\&.g\&. "MAC_ROMAN", "MAC_CYRILLIC"\&. If not specified the setting from
163 afpd\&.conf
164 is inherited\&. This setting is only required if you need volumes, where the mac codepage differs from the one globally set in
165 afpd\&.conf\&.
166 .RE
167 .PP
168 options:\fI[option]\fR
169 .RS 4
170 This allows multiple options to be specified in a comma delimited format\&. The available options are:
171 .PP
172 acls
173 .RS 4
174 Enable ACLs on this volume\&. Requires a
175 \fINFSv4 ACLs\fR
176 compatible filesystem (e\&.g\&. ZFS) and an ACL API compatible to *Solaris\&. In other words: this requires Solaris, Opensolaris or a derived distribution\&.
177 .RE
178 .PP
179 tm
180 .RS 4
181 Enable Time Machine suport for this volume\&.
182 .RE
183 .PP
184 invisibledots
185 .RS 4
186 Use with
187 \fBusedots\fR: make dot files invisible\&.
188 .RE
189 .PP
190 limitsize
191 .RS 4
192 Limit disk size reporting to 2GB\&. This can be used for older Macintoshes using newer Appleshare clients\&.
193 .RE
194 .PP
195 preexec_close
196 .RS 4
197 a non\-zero return code from preexec close the volume being immediately, preventing clients to mount/see the volume in question\&.
198 .RE
199 .PP
200 ro
201 .RS 4
202 Specifies the share as being read only for all users\&. The \&.AppleDB directory has to be writeable, you can use the
203 \fB\-dbpath\fR
204 option to relocate it\&. Overwrites
205 \fBea:auto\fR
206 with
207 \fBea:none\fR
208 .RE
209 .PP
210 root_preexec_close
211 .RS 4
212 a non\-zero return code from root_preexec closes the volume immediately, preventing clients to mount/see the volume in question\&.
213 .RE
214 .PP
215 upriv
216 .RS 4
217 use AFP3 unix privileges\&. Become familiar with the new "unix privileges" AFP permissions concepts in MacOS X before using this option\&. See also:
218 \fBperm|fperm|dperm\fR\&.
219 .RE
220 .PP
221 usedots
222 .RS 4
223 Don\'t do :hex translation for dot files\&. note: when this option gets set, certain file names become illegal\&. These are \&.Parent and anything that starts with \&.Apple\&. See also
224 \fBinvisibledots\fR\&.
225 .RE
226 .RE
227 .PP
228 password:\fI[password]\fR
229 .RS 4
230 This option allows you to set a volume password, which can be a maximum of 8 characters long (using ASCII strongly recommended at the time of this writing)\&.
231 .RE
232 .PP
233 perm|fperm|dperm:[mode]
234 .RS 4
235 Add(or) with the client requested permissions:
236 \fBperm\fR
237 affects files and directories,
238 \fBfperm\fR
239 is for files only,
240 \fBdperm\fR
241 is for directories only\&. Use with
242 \fBoptions:upriv\fR\&.
243 .PP
244 \fBExample.\ \&Volume for a collaborative workgroup\fR
245 .sp
246 .if n \{\
247 .RS 4
248 .\}
249 .nf
250 /path/to/volume "Workgroup" options:upriv dperm:0770 fperm:0660
251 .fi
252 .if n \{\
253 .RE
254 .\}
255 .RE
256 .PP
257 preexec:\fI[command]\fR
258 .RS 4
259 command to be run when the volume is mounted, ignored for user defined volumes
260 .RE
261 .PP
262 postexec:\fI[command]\fR
263 .RS 4
264 command to be run when the volume is closed, ignored for user defined volumes
265 .RE
266 .PP
267 root_preexec:\fI[command]\fR
268 .RS 4
269 command to be run as root when the volume is mounted, ignored for user defined volumes
270 .RE
271 .PP
272 root_postexec:\fI[command]\fR
273 .RS 4
274 command to be run as root when the volume is closed, ignored for user defined volumes
275 .RE
276 .PP
277 rolist:[\fBusers/groups\fR]
278 .RS 4
279 Allows certain users and groups to have read\-only access to a share\&. This follows the allow option format\&.
280 .RE
281 .PP
282 rwlist:\fI[users/groups]\fR
283 .RS 4
284 Allows certain users and groups to have read/write access to a share\&. This follows the allow option format\&.
285 .RE
286 .PP
287 veto:\fI[vetoed name]\fR
288 .RS 4
289 hide files and directories,where the path matches one of the \'/\' delimited vetoed names\&. Matches are partial, e\&.g\&. path is
290 /abc/def/file
291 and veto:/abc/ will hide the file\&.
292 .RE
293 .PP
294 volcharset:\fI[charset]\fR
295 .RS 4
296 specifies the volume codepage, e\&.g\&. "UTF8", "UTF8\-MAC", "ISO\-8859\-15"\&. Defaults to "UTF8"\&.
297 .RE
298 .SH "VARIABLE SUBSTITUTIONS"
299 .PP
300 You can use variables in both volume path and volume name\&.
301 .sp
302 .RS 4
303 .ie n \{\
304 \h'-04' 1.\h'+01'\c
305 .\}
306 .el \{\
307 .sp -1
308 .IP "  1." 4.2
309 .\}
310 if you specify an unknown variable, it will not get converted\&.
311 .RE
312 .sp
313 .RS 4
314 .ie n \{\
315 \h'-04' 2.\h'+01'\c
316 .\}
317 .el \{\
318 .sp -1
319 .IP "  2." 4.2
320 .\}
321 if you specify a known variable, but that variable doesn\'t have a value, it will get ignored\&.
322 .RE
323 .PP
324 The variables which can be used for substitutions are:
325 .PP
326 $b
327 .RS 4
328 basename
329 .RE
330 .PP
331 $c
332 .RS 4
333 client\'s ip or appletalk address
334 .RE
335 .PP
336 $d
337 .RS 4
338 volume pathname on server
339 .RE
340 .PP
341 $f
342 .RS 4
343 full name (contents of the gecos field in the passwd file)
344 .RE
345 .PP
346 $g
347 .RS 4
348 group name
349 .RE
350 .PP
351 $h
352 .RS 4
353 hostname
354 .RE
355 .PP
356 $i
357 .RS 4
358 client\'s ip, without port
359 .RE
360 .PP
361 $s
362 .RS 4
363 server name (this can be the hostname)
364 .RE
365 .PP
366 $u
367 .RS 4
368 user name (if guest, it is the user that guest is running as)
369 .RE
370 .PP
371 $v
372 .RS 4
373 volume name (either ADEID_NAME or basename of path)
374 .RE
375 .PP
376 $z
377 .RS 4
378 appletalk zone (may not exist)
379 .RE
380 .PP
381 $$
382 .RS 4
383 prints dollar sign ($)
384 .RE
385 .PP
386 When using variable substitution in the volume name, always keep in mind, not to exceed the 27 characters limit
387 .PP
388 \fBExample.\ \&Using variable substitution when defining volumes\fR
389 .PP
390 .if n \{\
391 .RS 4
392 .\}
393 .nf
394 /home/groups/$g "Groupdir for $g"
395 ~ "$f is the best one"
396 .fi
397 .if n \{\
398 .RE
399 .\}
400 .sp
401 We define "groupdirs" for each primary group and use a personalized server name for homedir shares\&.
402 .SH "CNID BACKENDS"
403 .PP
404 The AFP protocol mostly refers to files and directories by ID and not by name\&. Netatalk needs a way to store these ID\'s in a persistent way, to achieve this several different CNID backends are available\&. The CNID Databases are by default located in the
405 \&.AppleDB
406 folder in the volume root\&.
407 .PP
408 cdb
409 .RS 4
410 "Concurrent database", backend is based on Sleepycat\'s Berkely DB\&. With this backend several
411 \fBafpd\fR
412 deamons access the CNID database directly\&. Berkeley DB locking is used to synchronize access, if more than one
413 \fBafpd\fR
414 process is active for a volume\&. The drawback is, that the crash of a single
415 \fBafpd\fR
416 process might corrupt the database\&.
417 .RE
418 .PP
419 dbd
420 .RS 4
421 Access to the CNID database is restricted to the
422 \fBcnid_metad\fR
423 daemon process\&.
424 \fBafpd\fR
425 processes communicate with the daemon for database reads and updates\&. If built with Berkeley DB transactions the probability for database corruption is practically zero, but performance can be slower than with
426 \fBcdb\fR
427 .RE
428 .PP
429 last
430 .RS 4
431 This backend is an exception, in terms of ID persistency\&. ID\'s are only valid for the current session\&. This is basically what
432 \fBafpd\fR
433 did in the 1\&.5 (and 1\&.6) versions\&. This backend is still available, as it is useful for e\&.g\&. sharing cdroms\&.
434 .sp
435 \fBWarning\fR: It is
436 \fINOT\fR
437 recommended to use this backend for volumes anymore, as
438 \fBafpd\fR
439 now relies heavily on a persistent ID database\&. Aliases will likely not work and filename mangling is not supported\&.
440 .RE
441 .PP
442 Even though
443 \fB\&./configure \-\-help\fR
444 might show that there are other CNID backends available, be warned those are likely broken or mainly used for testing\&. Don\'t use them unless you know what you\'re doing, they may be removed without further notice from future versions\&.
445 .SH "CHARSET OPTIONS"
446 .PP
447 With OS X Apple introduced the AFP3 protocol\&. One of the most important changes was that AFP3 uses unicode names encoded as UTF\-8 decomposed\&. Previous AFP/OS versions used codepages, like MacRoman, MacCentralEurope, etc\&.
448 .PP
449 \fBafpd\fR
450 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\&. An extended character (>0x7F) would be converted to a :xx sequence, e\&.g\&. the Apple Logo (MacRoman: 0XF0) was saved as
451 :f0\&. Some special characters will be converted as to :xx notation as well\&. \'/\' will be encoded to
452 :2f, if
453 \fB\-usedots\fR
454 is not specified, a leading dot \'\&.\' will be encoded as
455 :2e\&.
456 .PP
457 This version now uses UTF\-8 as the default encoding for names\&. Special characters, like \'/\' and a leading \'\&.\' will still be CAP style encoded \&.
458 .PP
459 The
460 \fB\-volcharset\fR
461 option will allow you to select another volume encoding\&. E\&.g\&. for western users another useful setting could be \-volcharset ISO\-8859\-15\&.
462 \fBapfd\fR
463 will accept any
464 \fBiconv\fR(1)
465 provided charset\&. If a character cannot be converted from the mac codepage to the selected volcharset, afpd will save it as a CAP encoded character\&. For AFP3 clients,
466 \fBafpd\fR
467 will convert the UTF\-8
468 character to
469 \fB\-maccharset\fR
470 first\&. If this conversion fails, you\'ll receive a \-50 error on the mac\&.
471 .PP
472 \fINote\fR: Whenever you can, please stick with the default UTF\-8 volume format\&.
473 .SH "COMPATIBILITY WITH EARLIER VERSIONS"
474 .PP
475 To use a volume created with an earlier
476 \fBafpd\fR
477 version, you\'ll have to specify the following options:
478 .PP
479 \fBExample.\ \&use a 1.x style volume\fR
480 .sp
481 .if n \{\
482 .RS 4
483 .\}
484 .nf
485 /path/to/volume "Volname" adouble:v1 volcharset:ASCII
486 .fi
487 .if n \{\
488 .RE
489 .\}
490 .PP
491 In case you used an NLS you could try using a compatible iconv charset for
492 \fB\-volcharset\fR\&.
493 .PP
494 \fBExample.\ \&use a 1.x style volume, created with maccode.iso8859-1\fR
495 .sp
496 .if n \{\
497 .RS 4
498 .\}
499 .nf
500 /path/to/volume "Volname" adouble:v1 volcharset:ISO\-8859\-1
501 .fi
502 .if n \{\
503 .RE
504 .\}
505 .PP
506 You should consider converting old style volumes to the new UTF\-8/AD2 format\&. The safest way to do this, is to create a new volume with the default options and copy the files between this volumes with a mac\&.
507 .PP
508 \fINote\fR: Using above example options will allow you to downgrade to 1\&.x netatalk again\&.
509 .PP
510 \fINote\fR: Some 1\&.x NLS files used non standard mappings, e\&.g\&.
511 maccode\&.iso8859\-1\&.adapted\&. Three 1\&.x CAP double\-byte maccharsets are incompatible to netatalk 2\&.x; "MAC_CHINESE_TRAD", "MAC_JAPANESE" and "MAC_KOREAN"\&. These are not supported anymore\&. You\'ll have to copy the contents of those volumes files to a Mac and then back to the netatalk server, preferably to an UTF\-8 volume\&.
512 .SH "ADVANCED OPTIONS"
513 .PP
514 The following options should only be used after serious consideration\&. Be sure you fully understood the, sometimes complex, consequences, before using them\&.
515 .PP
516 casefold:\fB[option]\fR
517 .RS 4
518 The casefold option handles, if the case of filenames should be changed\&. The available options are:
519 .sp
520 \fBtolower\fR
521 \- Lowercases names in both directions\&.
522 .sp
523 \fBtoupper\fR
524 \- Uppercases names in both directions\&.
525 .sp
526 \fBxlatelower\fR
527 \- Client sees lowercase, server sees uppercase\&.
528 .sp
529 \fBxlateupper\fR
530 \- Client sees uppercase, server sees lowercase\&.
531 .RE
532 .PP
533 options:[\fBoption\fR]
534 .RS 4
535 This allows multiple options to be specified in a comma delimited format\&. The available options are:
536 .PP
537 caseinsensitive
538 .RS 4
539 The underlying filesystem is case insensitive (only tested with JFS in OS2 mode)\&.
540 .RE
541 .PP
542 crlf
543 .RS 4
544 Enables crlf translation for TEXT files, automatically converting macintosh line breaks into Unix ones\&. Use of this option might be dangerous since some older programs store binary data files as type "TEXT" when saving and switch the filetype in a second step\&.
545 \fBAfpd\fR
546 will potentially destroy such files when "erroneously" changing bytes in order to do line break translation\&.
547 .RE
548 .PP
549 dropbox
550 .RS 4
551 Allows a volume to be declared as being a "dropbox\&." Note that netatalk must be compiled with dropkludge support for this to function\&.
552 \fIWarning\fR: This option is deprecated and might not work as expected\&.
553 .RE
554 .PP
555 mswindows
556 .RS 4
557 Forces filename restrictions imposed by MS WinXX\&.
558 \fIWarning\fR: This is
559 \fINOT\fR
560 recommened for volumes mainly used by Macs\&. Please make sure you fully understand this option before using it\&.
561 .if n \{\
562 .sp
563 .\}
564 .RS 4
565 .it 1 an-trap
566 .nr an-no-space-flag 1
567 .nr an-break-flag 1
568 .br
569 .ps +1
570 \fBWarning\fR
571 .ps -1
572 .br
573 This option breaks direct saving to netatalk volumes from some applications, i\&.e\&. OfficeX\&.
574 .sp .5v
575 .RE
576 .RE
577 .PP
578 noadouble
579 .RS 4
580 Forces
581 \fBafpd\fR
582 to not create \&.AppleDouble directories unless macintosh metadata needs to be written\&. This option is only useful if you want to share files mostly used NOT by macs, causing
583 \fBafpd\fR
584 to not automatically create \&.AppleDouble subdirs containing AD header files in every directory it enters (which will it do by default)\&.
585 .sp
586 In case, you save or change files from mac clients, AD metadata files have to be written even in case you set this option\&. So you can\'t avoid the creation of \&.AppleDouble directories and its contents when you give macs write access to a share and they make use of it\&.
587 .sp
588 Try to avoid
589 \fBnoadouble\fR
590 whenever possible\&.
591 .RE
592 .PP
593 nocnidcache
594 .RS 4
595 If set
596 \fBafpd\fR
597 doesn\'t store the ID information in AppleDouble V2 header files\&. As these IDs are used for caching and as a database backup, this option normally shouldn\'t be set\&.
598 .RE
599 .PP
600 nodev
601 .RS 4
602 always use 0 for device number, helps when the device number is not constant across a reboot, cluster, \&.\&.\&.
603 .RE
604 .PP
605 nofileid
606 .RS 4
607 don\'t advertise createfileid, resolveid, deleteid calls\&.
608 .RE
609 .PP
610 nohex
611 .RS 4
612 Disables :hex translations for anything except dot files\&. This option makes the
613 \'/\' character illegal\&.
614 .RE
615 .PP
616 nostat
617 .RS 4
618 don\'t stat volume path when enumerating volumes list, useful for automounting or volumes created by a preexec script\&.
619 .RE
620 .PP
621 prodos
622 .RS 4
623 Provides compatibility with Apple II clients\&.
624 .RE
625 .RE
626 .SH "SEE ALSO"
627 .PP
628 \fBafpd.conf\fR(5),
629 \fBafpd\fR(8),
630 \fBafp_ldap.conf\fR(5),
631 \fBafp_acls\fR(8)