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