APPLEVOLUMES.DEFAU(5) | Netatalk 3.0 | APPLEVOLUMES.DEFAU(5) |
NAME¶
AppleVolumes.default, AppleVolumes.system, AppleVolumes - Configuration file used by afpd(8) to determine the shares made available through AFP and specify file name extension mappings.
SYNOPSIS¶
/etc/netatalk/AppleVolumes.default
/etc/netatalk/AppleVolumes.system
~/AppleVolumes
~/.AppleVolumes
~/applevolumes
~/.applevolumes
DESCRIPTION¶
/etc/netatalk/AppleVolumes.system and one of /etc/netatalk/AppleVolumes.default, ~/AppleVolumes, ~/.AppleVolumes, ~/applevolumes, or ~/.applevolumes are the configuration files used by afpd 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:
path [ volume name ] [ options ]
.extension [ type [ creator ] ]
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.
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 volumename is unspecified, the last component of pathname is used. No two volumes may have the same name. If there are spaces in the name, it should be in quotes (i.e. "File Share"). The volume name cannot contain the ':' 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
Note
Each volume has to be configured on a single line. Though newline escaping is supported.
The leading-dot lines specify file name extension mappings. The extension '.' sets the default creator and type for otherwise untyped Unix files.
Note
File name extension mapping is useful for Mac OS 9 and earlier. But it should not use for Mac OS X.
It is possible to specify default options for all volumes with a :DEFAULT: line preceeding these volume definitions:
Example. :DEFAULT: configuration line
:DEFAULT: options:upriv,usedots dbpath:/var/dbd/AppleDB/$v dperm:0775 fperm:0664
The possible options and their meanings are:
adouble:[v1|v2|osx]
Note
adouble:osx cannot be treated normally any longer. Its only aim was to temporarely share e.g. 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.
volsizelimit:size in MiB
allow:[users/groups]
deny:[users/groups]
allowed_hosts:[IP host address/IP netmask bits[, ... ]]
Example: allowed_hosts:10.1.0.0/16,10.2.1.100,2001:0db8:1234::/48
denied_hosts:[IP host address/IP netmask bits[, ...]]
Example: denied_hosts: 192.168.100/24,10.1.1.1,2001:db8::1428:57ab
cnidscheme:[backend]
dbpath:[path]
cnidserver:[fqdn|IP[:port]]
ea:[none|auto|sys|ad]
auto
sys
ad
none
maccharset:[charset]
options:[option]
searchdb
tm
invisibledots
nonetids
limitsize
preexec_close
ro
root_preexec_close
upriv
usedots
followsymlinks
password:[password]
perm|fperm|dperm:[mode]
Example. Volume for a collaborative workgroup
/path/to/volume "Workgroup" options:upriv dperm:0770 fperm:0660
umask:[mode]
preexec:[command]
postexec:[command]
root_preexec:[command]
root_postexec:[command]
rolist:[users/groups]
rwlist:[users/groups]
veto:[vetoed names]
volcharset:[charset]
VARIABLE SUBSTITUTIONS¶
You can use variables in both volume path and volume name.
The variables which can be used for substitutions are:
$b
$c
$d
$f
$g
$h
$i
$s
$u
$v
$z
$$
Example. Using variable substitution when defining volumes
/home/groups/$g "Groupdir for $g" ~ "$f is the best one"
We define "groupdirs" for each primary group and use a personalized server name for homedir shares.
CNID BACKENDS¶
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 .AppleDB folder in the volume root.
cdb
dbd
last
Warning: It is NOT recommended to use this backend for volumes anymore, as afpd now relies heavily on a persistent ID database. Aliases will likely not work and filename mangling is not supported.
Even though ./configure --help 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.
CHARSET OPTIONS¶
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.
afpd 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 :f0. Some special characters will be converted as to :xx notation as well. '/' will be encoded to :2f, if usedots is not specified, a leading dot '.' will be encoded as :2e.
This version now uses UTF-8 as the default encoding for names. Special characters, like '/' and a leading '.' will still be CAP style encoded .
The -volcharset option will allow you to select another volume encoding. E.g. for western users another useful setting could be -volcharset ISO-8859-15. apfd will accept any iconv(1) 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, afpd will convert the UTF-8 character to -maccharset first. If this conversion fails, you'll receive a -50 error on the mac.
Note: Whenever you can, please stick with the default UTF-8 volume format.
COMPATIBILITY WITH EARLIER VERSIONS¶
To use a volume created with an earlier afpd version, you'll have to specify the following options:
Example. use a 1.x style volume
/path/to/volume "Volname" adouble:v1 volcharset:ASCII
In case you used an NLS you could try using a compatible iconv charset for -volcharset.
Example. use a 1.x style volume, created with maccode.iso8859-1
/path/to/volume "Volname" adouble:v1 volcharset:ISO-8859-1
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.
Note: Using above example options will allow you to downgrade to 1.x netatalk again.
Note: Some 1.x NLS files used non standard mappings, e.g. 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.
ADVANCED OPTIONS¶
The following options should only be used after serious consideration. Be sure you fully understood the, sometimes complex, consequences, before using them.
casefold:[option]
tolower - Lowercases names in both directions.
toupper - Uppercases names in both directions.
xlatelower - Client sees lowercase, server sees uppercase.
xlateupper - Client sees uppercase, server sees lowercase.
options:[option]
caseinsensitive
crlf
dropbox
dropkludge
mswindows
Warning
This option breaks direct saving to netatalk volumes from some applications, i.e. OfficeX.
noadouble
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.
Try to avoid noadouble whenever possible.
nocnidcache
nodev
nofileid
nohex
nostat
prodos
FILE NAME EXTENSION MAPPINGS¶
Example. Extension is jpg. Type is "JPEG". Creator is "ogle".
.jpg "JPEG" "ogle"
Example. Extension is lzh. Type is "LHA ". Creator is not defined.
.lzh "LHA "
SEE ALSO¶
27 Dez 2012 | Netatalk 3.0 |