]> arthur.barton.de Git - netatalk.git/blob - man/man5/AppleVolumes.default.5.tmpl
New default for ea volume option is "sys".
[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: 02 Octobre 2009
6 .\"    Manual: Netatalk 2.1
7 .\"    Source: Netatalk 2.1
8 .\"  Language: English
9 .\"
10 .TH "APPLEVOLUMES\&.DEFAU" "5" "02 Octobre 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 The possible options and their meanings are:
58 .PP
59 adouble:\fI[v1|v2|osx]\fR
60 .RS 4
61 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
62 .if n \{\
63 .sp
64 .\}
65 .RS 4
66 .it 1 an-trap
67 .nr an-no-space-flag 1
68 .nr an-break-flag 1
69 .br
70 .ps +1
71 \fBNote\fR
72 .ps -1
73 .br
74 Using
75 \fBadouble:osx\fR
76 is
77 \fBnot\fR
78 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
79 .sp .5v
80 .RE
81 .RE
82 .PP
83 allow:\fI[users/groups]\fR
84 .RS 4
85 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
86 .RE
87 .PP
88 deny:\fI[users/groups]\fR
89 .RS 4
90 The deny option specifies users and groups who are not allowed access to the share\&. It follows the same format as the allow option\&.
91 .RE
92 .PP
93 allowed_hosts:\fI[IPv4 host address/IPv4 netmask bits[, \&.\&.\&. ]]\fR
94 .RS 4
95 Only listed hosts and networks are allowed, all others are rejected\&. Example: allowed_hosts:10\&.1\&.0\&.0/16,10\&.2\&.1\&.100
96 .RE
97 .PP
98 denied_hosts:\fI[IPv4 host address/IPv4 netmask bits[, \&.\&.\&.]]\fR
99 .RS 4
100 Listed hosts and nets are rejected, all others are allowed\&. Example: denied_hosts: 192\&.168\&.100/24,10\&.1\&.1\&.1
101 .RE
102 .PP
103 cnidscheme:\fI[backend]\fR
104 .RS 4
105 set the CNID backend to be used for the volume, default is [:DEFAULT_CNID_SCHEME:] available schemes: [:COMPILED_BACKENDS:]
106 .RE
107 .PP
108 dbpath:\fI[path]\fR
109 .RS 4
110 Sets the database information to be stored in path\&. You have to specifiy a writable location, even if the volume is read only\&.
111 .RE
112 .PP
113 ea:\fI[sys|ad]\fR
114 .RS 4
115 Specify the format of the metadata files which are used for saving Extended Attributes\&.
116 \fBsys\fR
117 is the default and stores the EAs in native filesystem Extended Attributes\&.
118 \fBad\fR
119 uses ordinary files inside the \&.AppleDouble directories\&.
120 .RE
121 .PP
122 maccharset:\fI[charset]\fR
123 .RS 4
124 specifies the mac client codepage for this Volume, e\&.g\&. "MAC_ROMAN", "MAC_CYRILLIC"\&. If not specified the setting from
125 afpd\&.conf
126 is inherited\&. This setting is only required if you need volumes, where the mac codepage differs from the one globally set in
127 afpd\&.conf\&.
128 .RE
129 .PP
130 options:\fI[option]\fR
131 .RS 4
132 This allows multiple options to be specified in a comma delimited format\&. The available options are:
133 .PP
134 acls
135 .RS 4
136 Enable ACLs on this volume\&. Requires a
137 \fINFSv4 ACLs\fR
138 compatible filesystem (e\&.g\&. ZFS) and an ACL API compatible to *Solaris\&. In other words: this requires Solaris, Opensolaris or a derived distribution\&.
139 .RE
140 .PP
141 tm
142 .RS 4
143 Enable Time Machine suport for this volume\&.
144 .RE
145 .PP
146 invisibledots
147 .RS 4
148 Use with
149 \fBusedots\fR: make dot files invisible\&.
150 .RE
151 .PP
152 limitsize
153 .RS 4
154 Limit disk size reporting to 2GB\&. This can be used for older Macintoshes using newer Appleshare clients\&.
155 .RE
156 .PP
157 preexec_close
158 .RS 4
159 a non\-zero return code from preexec close the volume being immediately, preventing clients to mount/see the volume in question\&.
160 .RE
161 .PP
162 ro
163 .RS 4
164 Specifies the share as being read only for all users\&. The \&.AppleDB directory has to be writeable, you can use the
165 \fB\-dbpath\fR
166 option to relocate it\&.
167 .RE
168 .PP
169 root_preexec_close
170 .RS 4
171 a non\-zero return code from root_preexec closes the volume immediately, preventing clients to mount/see the volume in question\&.
172 .RE
173 .PP
174 upriv
175 .RS 4
176 use AFP3 unix privileges\&. Become familiar with the new "unix privileges" AFP permissions concepts in MacOS X before using this option\&. See also:
177 \fBperm|fperm|dperm\fR\&.
178 .RE
179 .PP
180 usedots
181 .RS 4
182 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
183 \fBinvisibledots\fR\&.
184 .RE
185 .RE
186 .PP
187 password:\fI[password]\fR
188 .RS 4
189 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)\&.
190 .RE
191 .PP
192 perm|fperm|dperm:[mode]
193 .RS 4
194 Add(or) with the client requested permissions:
195 \fBperm\fR
196 affects files and directories,
197 \fBfperm\fR
198 is for files only,
199 \fBdperm\fR
200 is for directories only\&. Use with
201 \fBoptions:upriv\fR\&.
202 .PP
203 \fBExample.\ \&Volume for a collaborative workgroup\fR
204 .sp
205 .if n \{\
206 .RS 4
207 .\}
208 .nf
209 /path/to/volume "Workgroup" options:upriv dperm:0770 fperm:0660
210 .fi
211 .if n \{\
212 .RE
213 .\}
214 .RE
215 .PP
216 preexec:\fI[command]\fR
217 .RS 4
218 command to be run when the volume is mounted, ignored for user defined volumes
219 .RE
220 .PP
221 postexec:\fI[command]\fR
222 .RS 4
223 command to be run when the volume is closed, ignored for user defined volumes
224 .RE
225 .PP
226 root_preexec:\fI[command]\fR
227 .RS 4
228 command to be run as root when the volume is mounted, ignored for user defined volumes
229 .RE
230 .PP
231 root_postexec:\fI[command]\fR
232 .RS 4
233 command to be run as root when the volume is closed, ignored for user defined volumes
234 .RE
235 .PP
236 rolist:[\fBusers/groups\fR]
237 .RS 4
238 Allows certain users and groups to have read\-only access to a share\&. This follows the allow option format\&.
239 .RE
240 .PP
241 rwlist:\fI[users/groups]\fR
242 .RS 4
243 Allows certain users and groups to have read/write access to a share\&. This follows the allow option format\&.
244 .RE
245 .PP
246 veto:\fI[vetoed name]\fR
247 .RS 4
248 hide files and directories,where the path matches one of the \'/\' delimited vetoed names\&. Matches are partial, e\&.g\&. path is
249 /abc/def/file
250 and veto:/abc/ will hide the file\&.
251 .RE
252 .PP
253 volcharset:\fI[charset]\fR
254 .RS 4
255 specifies the volume codepage, e\&.g\&. "UTF8", "UTF8\-MAC", "ISO\-8859\-15"\&. Defaults to "UTF8"\&.
256 .RE
257 .SH "VARIABLE SUBSTITUTIONS"
258 .PP
259 You can use variables in both volume path and volume name\&.
260 .sp
261 .RS 4
262 .ie n \{\
263 \h'-04' 1.\h'+01'\c
264 .\}
265 .el \{\
266 .sp -1
267 .IP "  1." 4.2
268 .\}
269 if you specify an unknown variable, it will not get converted\&.
270 .RE
271 .sp
272 .RS 4
273 .ie n \{\
274 \h'-04' 2.\h'+01'\c
275 .\}
276 .el \{\
277 .sp -1
278 .IP "  2." 4.2
279 .\}
280 if you specify a known variable, but that variable doesn\'t have a value, it will get ignored\&.
281 .RE
282 .PP
283 The variables which can be used for substitutions are:
284 .PP
285 $b
286 .RS 4
287 basename
288 .RE
289 .PP
290 $c
291 .RS 4
292 client\'s ip or appletalk address
293 .RE
294 .PP
295 $d
296 .RS 4
297 volume pathname on server
298 .RE
299 .PP
300 $f
301 .RS 4
302 full name (contents of the gecos field in the passwd file)
303 .RE
304 .PP
305 $g
306 .RS 4
307 group name
308 .RE
309 .PP
310 $h
311 .RS 4
312 hostname
313 .RE
314 .PP
315 $i
316 .RS 4
317 client\'s ip, without port
318 .RE
319 .PP
320 $s
321 .RS 4
322 server name (this can be the hostname)
323 .RE
324 .PP
325 $u
326 .RS 4
327 user name (if guest, it is the user that guest is running as)
328 .RE
329 .PP
330 $v
331 .RS 4
332 volume name (either ADEID_NAME or basename of path)
333 .RE
334 .PP
335 $z
336 .RS 4
337 appletalk zone (may not exist)
338 .RE
339 .PP
340 $$
341 .RS 4
342 prints dollar sign ($)
343 .RE
344 .PP
345 When using variable substitution in the volume name, always keep in mind, not to exceed the 27 characters limit
346 .PP
347 \fBExample.\ \&Using variable substitution when defining volumes\fR
348 .PP
349 .if n \{\
350 .RS 4
351 .\}
352 .nf
353 /home/groups/$g "Groupdir for $g"
354 ~ "$f is the best one"
355 .fi
356 .if n \{\
357 .RE
358 .\}
359 .sp
360 We define "groupdirs" for each primary group and use a personalized server name for homedir shares\&.
361 .SH "CNID BACKENDS"
362 .PP
363 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
364 \&.AppleDB
365 folder in the volume root\&.
366 .PP
367 cdb
368 .RS 4
369 "Concurrent database", backend is based on Sleepycat\'s Berkely DB\&. With this backend several
370 \fBafpd\fR
371 deamons access the CNID database directly\&. Berkeley DB locking is used to synchronize access, if more than one
372 \fBafpd\fR
373 process is active for a volume\&. The drawback is, that the crash of a single
374 \fBafpd\fR
375 process might corrupt the database\&.
376 .RE
377 .PP
378 dbd
379 .RS 4
380 Access to the CNID database is restricted to the
381 \fBcnid_metad\fR
382 daemon process\&.
383 \fBafpd\fR
384 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
385 \fBcdb\fR
386 .RE
387 .PP
388 last
389 .RS 4
390 This backend is an exception, in terms of ID persistency\&. ID\'s are only valid for the current session\&. This is basically what
391 \fBafpd\fR
392 did in the 1\&.5 (and 1\&.6) versions\&. This backend is still available, as it is useful for e\&.g\&. sharing cdroms\&.
393 .sp
394 \fBWarning\fR: It is
395 \fINOT\fR
396 recommended to use this backend for volumes anymore, as
397 \fBafpd\fR
398 now relies heavily on a persistent ID database\&. Aliases will likely not work and filename mangling is not supported\&.
399 .RE
400 .PP
401 Even though
402 \fB\&./configure \-\-help\fR
403 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\&.
404 .SH "CHARSET OPTIONS"
405 .PP
406 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\&.
407 .PP
408 \fBafpd\fR
409 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
410 :f0\&. Some special characters will be converted as to :xx notation as well\&. \'/\' will be encoded to
411 :2f, if
412 \fB\-usedots\fR
413 is not specified, a leading dot \'\&.\' will be encoded as
414 :2e\&.
415 .PP
416 This version now uses UTF\-8 as the default encoding for names\&. Special characters, like \'/\' and a leading \'\&.\' will still be CAP style encoded \&.
417 .PP
418 The
419 \fB\-volcharset\fR
420 option will allow you to select another volume encoding\&. E\&.g\&. for western users another useful setting could be \-volcharset ISO\-8859\-15\&.
421 \fBapfd\fR
422 will accept any
423 \fBiconv\fR(1)
424 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,
425 \fBafpd\fR
426 will convert the UTF\-8
427 character to
428 \fB\-maccharset\fR
429 first\&. If this conversion fails, you\'ll receive a \-50 error on the mac\&.
430 .PP
431 \fINote\fR: Whenever you can, please stick with the default UTF\-8 volume format\&.
432 .SH "COMPATIBILITY WITH EARLIER VERSIONS"
433 .PP
434 To use a volume created with an earlier
435 \fBafpd\fR
436 version, you\'ll have to specify the following options:
437 .PP
438 \fBExample.\ \&use a 1.x style volume\fR
439 .sp
440 .if n \{\
441 .RS 4
442 .\}
443 .nf
444 /path/to/volume "Volname" adouble:v1 volcharset:ASCII
445 .fi
446 .if n \{\
447 .RE
448 .\}
449 .PP
450 In case you used an NLS you could try using a compatible iconv charset for
451 \fB\-volcharset\fR\&.
452 .PP
453 \fBExample.\ \&use a 1.x style volume, created with maccode.iso8859-1\fR
454 .sp
455 .if n \{\
456 .RS 4
457 .\}
458 .nf
459 /path/to/volume "Volname" adouble:v1 volcharset:ISO\-8859\-1
460 .fi
461 .if n \{\
462 .RE
463 .\}
464 .PP
465 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\&.
466 .PP
467 \fINote\fR: Using above example options will allow you to downgrade to 1\&.x netatalk again\&.
468 .PP
469 \fINote\fR: Some 1\&.x NLS files used non standard mappings, e\&.g\&.
470 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\&.
471 .SH "ADVANCED OPTIONS"
472 .PP
473 The following options should only be used after serious consideration\&. Be sure you fully understood the, sometimes complex, consequences, before using them\&.
474 .PP
475 casefold:\fB[option]\fR
476 .RS 4
477 The casefold option handles, if the case of filenames should be changed\&. The available options are:
478 .sp
479 \fBtolower\fR
480 \- Lowercases names in both directions\&.
481 .sp
482 \fBtoupper\fR
483 \- Uppercases names in both directions\&.
484 .sp
485 \fBxlatelower\fR
486 \- Client sees lowercase, server sees uppercase\&.
487 .sp
488 \fBxlateupper\fR
489 \- Client sees uppercase, server sees lowercase\&.
490 .RE
491 .PP
492 options:[\fBoption\fR]
493 .RS 4
494 This allows multiple options to be specified in a comma delimited format\&. The available options are:
495 .PP
496 nocnidcache
497 .RS 4
498 If set
499 \fBafpd\fR
500 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\&.
501 .RE
502 .PP
503 crlf
504 .RS 4
505 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\&.
506 \fBAfpd\fR
507 will potentially destroy such files when "erroneously" changing bytes in order to do line break translation\&.
508 .RE
509 .PP
510 dropbox
511 .RS 4
512 Allows a volume to be declared as being a "dropbox\&." Note that netatalk must be compiled with dropkludge support for this to function\&.
513 \fIWarning\fR: This option is deprecated and might not work as expected\&.
514 .RE
515 .PP
516 mswindows
517 .RS 4
518 Forces filename restrictions imposed by MS WinXX\&.
519 \fIWarning\fR: This is
520 \fINOT\fR
521 recommened for volumes mainly used by Macs\&. Please make sure you fully understand this option before using it\&.
522 .if n \{\
523 .sp
524 .\}
525 .RS 4
526 .it 1 an-trap
527 .nr an-no-space-flag 1
528 .nr an-break-flag 1
529 .br
530 .ps +1
531 \fBWarning\fR
532 .ps -1
533 .br
534 This option breaks direct saving to netatalk volumes from some applications, i\&.e\&. OfficeX\&.
535 .sp .5v
536 .RE
537 .RE
538 .PP
539 noadouble
540 .RS 4
541 Forces
542 \fBafpd\fR
543 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
544 \fBafpd\fR
545 to not automatically create \&.AppleDouble subdirs containing AD header files in every directory it enters (which will it do by default)\&.
546 .sp
547 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\&.
548 .sp
549 Try to avoid
550 \fBnoadouble\fR
551 whenever possible\&.
552 .RE
553 .PP
554 nodev
555 .RS 4
556 always use 0 for device number, helps when the device number is not constant across a reboot, cluster, \&.\&.\&.
557 .RE
558 .PP
559 nofileid
560 .RS 4
561 don\'t advertise createfileid, resolveid, deleteid calls\&.
562 .RE
563 .PP
564 nohex
565 .RS 4
566 Disables :hex translations for anything except dot files\&. This option makes the
567 \'/\' character illegal\&.
568 .RE
569 .PP
570 nostat
571 .RS 4
572 don\'t stat volume path when enumerating volumes list, useful for automounting or volumes created by a preexec script\&.
573 .RE
574 .PP
575 prodos
576 .RS 4
577 Provides compatibility with Apple II clients\&.
578 .RE
579 .RE
580 .SH "SEE ALSO"
581 .PP
582 \fBafpd.conf\fR(5),
583 \fBafpd\fR(8)