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