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