snmpd.internal

title: snmpd.internal(5)

text:
# snmpd.internal(5)

## NAME
snmpd.internal - internal configuration of the Net-SNMP agent

## DESCRIPTION
The snmpd.conf(5) man page defines the syntax and behaviour of the main configuration directives that can be used to control the operation of the Net-SNMP agent, and the management information it provides.

However there are several other configuration directives (many of which, though not all, start with a leading underscore) that are recognised by the agent. These are typically used to retain configuration across agent restarts, and are not intended for direct user access. This man page list these directives, giving a brief indication of where they are used. For full details - see the relevant source files. If you can't follow that source, you probably shouldn't be fiddling with these directives!

## AGENT BEHAVIOUR
quit

## ACCESS CONTROL

### VACM Configuration
vacmView / vacmGroup / vacmAccess

These directives are used to retain dynamically configured access control settings.

## SYSTEM INFORMATION

### System Group
setSerialNo

This directive is used to implement the advisory lock object snmpSetSerialNo.

psyslocation / psyscontact / psysname

These directives are used to retain dynamically configured system settings. They will be overridden by the corresponding sysLocation, sysContact and sysName directives.

## ACTIVE MONITORING

### Notification Handling
pauthtrapenable

This directive is used to retain the dynamically configured setting of whether the agent should generate authenticationFailure traps. It will be overridden by the corresponding authtrapenable directive.

snmpNotify*Table

targetAddr / targetParams

These directives are used to retain dynamically configured notification destination settings.

### DisMan Event MIB
_mteE*Table, _mteOTable, _mteT*Table

These directives are used to retain dynamically configured event, object and monitor trigger settings.

mteObjectsTable / mteTriggerTable

These directives are for compatibility with the previous disman/event-mib implementation.

### DisMan Schedule MIB
_schedTable

This directive is used to retain dynamically configured scheduled events.

## EXTENDING AGENT FUNCTIONALITY

### Arbitrary Extension Commands
extend-sh

exec2 / sh2 / execFix2

These directives were defined by analogy with equivalent directives in the previous ucd-snmp/extensible implementation. They are deprecated, and should not be used.

## FILES
/etc/snmp/snmpd.conf

## SEE ALSO
snmpconf(1), snmpd.conf(5), snmp.conf(5), snmp_config(5), snmpd(8), EXAMPLE.conf, netsnmp_config_api(3).


variables

package: net-snmp-snmpd

title: variables(5)

text:
# variables(5)

## NAME

variables - Format of specifying variable names to SNMP tools.

## DESCRIPTION
The syntax and semantics of management information in SNMP is given by the definitions of MIB objects, loaded from one or more MIB files (or "MIB modules"). These definitions are not strictly required for the SNMP protocol to operate correctly, but are typically needed by SNMP client applications to display information in a meaningful manner.

The MIB file also serves as a design document when developing an SNMP agent (or sub-agent) that provides this information, and ensures that client and server share a common understanding about what management information represents.

## OIDs
MIB objects are specified using Object Identifiers (OIDs), which can take a number of forms. Note that all of the examples in this section refer to the same MIB object.

### Numeric OIDs
The fundamental format of an OID is a sequence of integer values (or "subidentifiers"), typically written using dots to separate the individual subidentifiers.

.1.3.6.1.2.1.1.1

This is the format that is used within the SNMP protocol itself, in the packets that are sent over the network. This form of representing an OID does not require MIB files or MIB object definitions to be available. However it does rely on the client application and/or network administrator knowing what a given numeric OID refers to. As such, it is not a particularly helpful representation to anyone just starting out with SNMP.

This format can be obtained by giving the command-line option -On to most Net-SNMP commands.

### Full OID path
A similar (but somewhat more informative) format uses the same dotted list representation, but with the numeric subidentifiers replaced by names, taken from the relevant MIB file(s).

.iso.org.dod.internet.mgmt.mib-2.system.sysDescr

This uniquely identifies a particular MIB object (as with the numeric OID), but the list of names should hopefully give some indication as to what information this object represents. However it does rely on the relevant MIB files being available (as do all formats other than the purely numeric OID). Such OIDs also tend to be fairly long! This format can be obtained by giving the command-line option -Of to most Net-SNMP commands.

A variant of this (typically used when writing OIDs in descriptive text, rather than running programs), is to combine the name and numeric subidentifier:

.iso(1).org(3).dod(6).internet(1).mgmt(2).mib-2(1).system(1)

.sysDescr(1)

### Module-qualified OIDs
An alternative way to (more-or-less) uniquely specify an OID, is to give the name of the MIB object, together with the MIB module where it is defined.

SNMPv2-MIB::sysDescr

MIB object names are unique within a given module, so as long as there are not two MIB modules with the same name (which is unusual, though not unheard of), this format specifies the desired object in a reasonably compact form. It also makes it relatively easy to find the definition of the MIB object. This is the default format for displaying OIDs in Net-SNMP applications. It can also be specified explicitly by giving the command-line option -OS to most Net-SNMP commands.

### Object name
Possibly the most common form for specifying MIB objects is using the name of the object alone - without the full path or the name of the module that defines it.

sysDescr

This is by far the shortest and most convenient way to refer to a MIB object. However the danger is that if two MIB modules each define a MIB object with the same name (which is perfectly legal in some circumstances), then it's not necessarily clear which MIB object is actually meant. For day-to-day use, particularly when using standard MIB objects, this is probaby safe. But it's important to be aware of the potential ambiguities. This format can be obtained by giving the command-line option -Os to most Net-SNMP commands.

### UCD-format
Previous versions of the code (UCD v4.x and earlier) used a simple approach to shortening the way OIDs were specified. If the full path of the OID began with .iso.org.dod.internet.mgmt.mib-2 then this prefix was removed from the OID before displaying it. All other OIDs were displayed in full.

Similarly, if an OID was passed to the UCD library that did not begin with a dot (and wasn't in the module::name format), then the same prefix was prepended. The example OID from the formats listed above would therefore be given or displayed as

system.sysDescr

The inconsistent handling of OIDs, depending on their location within the OID tree, proved to be more trouble than it was worth, and this format is no longer recommended. The previous behaviour can be obtained by giving the command-line option -Ou (for displaying output), or -Iu (for interpreting input OIDs without a leading dot) to most Net-SNMP commands.

## SEE ALSO
snmpcmd(1)

## BUGS
The parser of the MIB files file is not expected to handle bizarre (although correct) interpretations of the ASN.1 notation.


snmptrapd.conf

package: net-snmp-snmptrapd

title: snmptrapd.conf(5)

text:
# snmptrapd.conf(5)

## NAME
snmptrapd.conf - configuration file for the Net-SNMP notification receiver

## DESCRIPTION
The Net-SNMP notification receiver (trap daemon) uses one or more configuration files to control its operation and how incoming traps (and INFORM requests) should be processed. This file (snmptrapd.conf) can be located in one of several locations, as described in the snmp_config(5) manual page.

## IMPORTANT
Previously, snmptrapd would accept all incoming notifications, and log them automatically (even if no explicit configuration was provided). Starting with release 5.3, access control checks will be applied to incoming notifications. If snmptrapd is run without a suitable configuration file (or equivalent access control settings), then such traps WILL NOT be processed. See the section ACCESS CONTROL for more details.

As with the agent configuration, the snmptrapd.conf directives can be divided into four distinct groups.

## TRAPD BEHAVIOUR
snmpTrapdAddr [<transport-specifier>:]<transport-address>[,...]

defines a list of listening addresses, on which to receive incoming SNMP notifications. See the section LISTENING ADDRESSES in the snmpd(8) manual page for more information about the format of listening addresses.

The default behaviour is to listen on UDP port 162 on all IPv4 interfaces.

doNotRetainNotificationLogs yes

disables support for the NOTIFICATION-LOG-MIB. Normally the snmptrapd program keeps a record of the traps received, which can be retrieved by querying the nlmLogTable and nlmLogvariableTable tables. This directive can be used to suppress this behaviour.

See the snmptrapd(8) manual page and the NOTIFICATION-LOG-MIB for details.

doNotLogTraps yes

disables the logging of notifications altogether. This is useful if the snmptrapd application should only run traphandle hooks and should not log traps to any location.

doNotFork yes

do not fork from the calling shell.

pidFile PATH

defines a file in which to store the process ID of the notification receiver. By default, this ID is not saved.

## ACCESS CONTROL
Starting with release 5.3, it is necessary to explicitly specify who is authorised to send traps and informs to the notification receiver (and what types of processing these are allowed to trigger). This uses an extension of the VACM model, used in the main SNMP agent.

There are currently three types of processing that can be specified:

log

log the details of the notification - either in a specified file, to standard output (or stderr), or via syslog (or similar).

execute

pass the details of the trap to a specified handler program, including embedded perl.

net

forward the trap to another notification receiver.

In the following directives, TYPES will be a (comma-separated) list of one or more of these tokens. Most commonly, this will typically be log,execute,net to cover any style of processing for a particular category of notification. But it is perfectly possible (even desirable) to limit certain notification sources to selected processing only.

authCommunity TYPES COMMUNITY [SOURCE [OID | -v VIEW ]]

authorises traps (and SNMPv2c INFORM requests) with the specified community to trigger the types of processing listed. By default, this will allow any notification using this community to be processed. The SOURCE field can be used to specify that the configuration should only apply to notifications received from particular sources - see snmpd.conf(5) for more details.

authUser TYPES [-s MODEL] USER [LEVEL [OID | -v VIEW ]]

authorises SNMPv3 notifications with the specified user to trigger the types of processing listed. By default, this will accept authenticated requests. (authNoPriv or authPriv). The LEVEL field can be used to allow unauthenticated notifications (noauth), or to require encryption (priv), just as for the SNMP agent.

With both of these directives, the OID (or -v VIEW) field can be used to retrict this configuration to the processing of particular notifications.

Note:

Unlike the VACM processing described in RFC 3415, this view is only matched against the snmpTrapOID value of the incoming notification. It is not applied to the payload varbinds held within that notification.

authGroup TYPES [-s MODEL] GROUP [LEVEL [OID | -v VIEW ]]

authAccess TYPES [-s MODEL] GROUP VIEW [LEVEL [CONTEXT]]

setAccess GROUP CONTEXT MODEL LEVEL PREFIX VIEW TYPES

authorise notifications in the specified GROUP (configured using the group directive) to trigger the types of processing listed. See snmpd.conf(5) for more details.

createUser [-e ENGINEID] username (MD5|SHA|SHA-512|SHA-384|SHA-256|SHA-224) authpassphrase [DES|AES]

See the snmpd.conf(5) manual page for a description of how to create SNMPv3 users. This is roughly the same, but the file name changes to snmptrapd.conf from snmpd.conf.

disableAuthorization yes

will disable the above access control checks, and revert to the previous behaviour of accepting all incoming notifications.

## LOGGING
format1 FORMAT

format2 FORMAT

specify the format used to display SNMPv1 TRAPs and SNMPv2 notifications respectively. Note that SNMPv2c and SNMPv3 both use the same SNMPv2 PDU format.

format DESTINATION FORMAT

specify the format used for different destinations. DESTINATION is one of: print, print1, print2, syslog, syslog1, syslog2, execute, execute1, execute2. print1 is used for printing SNMPv1 traps, print2 is for SNMPv2. print is used for both versions. syslog is similarly used when sending traps to syslog, and execute used when sending traps to a program such as traptoemail(1).

The default formats are

format print1 %.4y-%.2m-%.2l %.2h:%.2j:%.2k %B [%b] (via %A [%a]): %N\n\t%W Trap (%q) Uptime: %#T\n%v\n

format print2 %.4y-%.2m-%.2l %.2h:%.2j:%.2k %B [%b]:\n%v\n

format syslog1 %a: %W Trap (%q) Uptime: %#T%#v\n

format syslog2 %B [%b]: Trap %#v\n

format execute %B\n%b\n%V\n%v\n

See snmptrapd(8) for the layout characters available.

ignoreAuthFailure yes

instructs the receiver to ignore authenticationFailure traps.

Note:

This currently only affects the logging of such notifications. authenticationFailure traps will still be passed to trap handler scripts, and forwarded to other notification receivers. This behaviour should not be relied on, as it is likely to change in future versions.

logOption string

specifies where notifications should be logged - to standard output, standard error, a specified file or via syslog. See the section LOGGING OPTIONS in the snmpcmd(1) manual page for details.

outputOption string

specifies various characteristics of how OIDs and other values should be displayed. See the section OUTPUT OPTIONS in the snmpcmd(1) manual page for details.

## MySQL Logging
There are two configuration variables that work together to control when queued traps are logged to the MySQL database. A non-zero value must be specified for sqlSaveInterval to enable MySQL logging.

sqlMaxQueue max

specifies the maximum number of traps to queue before a forced flush to the MySQL database.

sqlSaveInterval seconds

specified the number of seconds between periodic queue flushes. A value of 0 for will disable MySQL logging.

## NOTIFICATION PROCESSING
As well as logging incoming notifications, they can also be forwarded on to another notification receiver, or passed to an external program for specialised processing.

traphandle OID|default PROGRAM [ARGS ...]

invokes the specified program (with the given arguments) whenever a notification is received that matches the OID token. For SNMPv2c and SNMPv3 notifications, this token will be compared against the snmpTrapOID value taken from the notification. For SNMPv1 traps, the generic and specific trap values and the enterprise OID will be converted into the equivalent OID (following RFC 2576).

Typically, the OID token will be the name (or numeric OID) of a NOTIFICATION-TYPE object, and the specified program will be invoked for notifications that match this OID exactly. However this token also supports a simple form of wildcard suffixing. By appending the character ´*' to the OID token, the corresponding program will be invoked for any notification based within subtree rooted at the specified OID. For example, an OID token of .1.3.6.1.4.1* would match any enterprise specific notification (including the specified OID itself). An OID token of .1.3.6.1.4.1.* would would work in much the same way, but would not match this exact OID - just notifications that lay strictly below this root. Note that this syntax does not support full regular expressions or wildcards - an OID token of the form oid.*.subids is not valid.

If the OID field is the token default then the program will be invoked for any notification not matching another (OID specific) traphandle entry.

Details of the notification are fed to the program via its standard input. Note that this will always use the SNMPv2-style notification format, with SNMPv1 traps being converted as per RFC 2576, before being passed to the program. The input format is, if you use the default set by the "format execute %B\n%b\n%V\n%v\n", one entry per line:

HOSTNAME

The name of the host that sent the notification, as determined by gethostbyaddr(3).

ADDRESS

The transport address, like

"[UDP: [172.16.10.12]:23456->[10.150.0.8]]"

VARBINDS

A list of variable bindings describing the contents of the notification, one per line. The first token on each line (up until a space) is the OID of the varind, and the remainder of the line is its value. The format of both of these are controlled by the outputOption directive (or similar configuration).

The first OID should always be SNMPv2-MIB::sysUpTime.0, and the second should be SNMPv2-MIB::snmpTrapOID.0. The remaining lines will contain the payload varbind list. For SNMPv1 traps, the final OID will be SNMPv2-MIB::snmpTrapEnterprise.0.

Example:

A traptoemail script has been included in the Net-SNMP package that can be used within a traphandle directive:

traphandle default /usr/bin/perl /usr/bin/traptoemail -s mysmtp.somewhere.com -f admin@somewhere.com me@somewhere.com

forward OID|default DESTINATION

forwards notifications that match the specified OID to another receiver listening on DESTINATION. The interpretation of OID (and default) is the same as for the traphandle directive).

See the section LISTENING ADDRESSES in the snmpd(8) manual page for more information about the format of listening addresses.

addForwarderInfo 1|yes|true|0|no|false

Each time a trap is forwarded, add an OID with the IP address of the system from which the trap has been received. The following OID is added: .1.3.6.1.6.3.18.1.3.x (SNMP-COMMUNITY-MIB::snmpTrapAddress.x) where x is the lowest index >= 0 that does not yet occur in the trap payload. The end recipient (i.e. the monitoring system) can determine the IPv4 address of the original sender by looking for the varbind with OID snmpTrapAddress.0. If that OID is not populated it means that the trap has been sent directly or in other words that it has not been forwarded.

## NOTES
o

The daemon blocks while executing the traphandle commands. (This should be fixed in the future with an appropriate signal catch and wait() combination).

o

All directives listed with a value of "yes" actually accept a range of boolean values. These will accept any of 1, yes or true to enable the corresponding behaviour, or any of 0, no or false to disable it. The default in each case is for the feature to be turned off, so these directives are typically only used to enable the appropriate behaviour.

## FILES
/etc/snmp/snmptrapd.conf

## SEE ALSO
snmp_config(5), snmptrapd(8), syslog(8), traptoemail(1), variables(5), netsnmp_config_api(3).


package: net-snmp-utils

title: mib2c.conf(5)

text:
# mib2c.conf(5)

## NAME
mib2c.conf - How to write mib2c.conf files to do ANYTHING based on MIB input.

## SYNOPSIS
% cat > mib2c.test.conf << EOF @foreach $t table@

Starting table $t

@foreach $c column@

echo $t has column $c which has a syntax of $c.syntax

@end@

@end@ EOF

% mib2c -c mib2c.test.conf internet

## DESCRIPTION
The mib2c.conf script language is a MIB-particular language designed to easily process MIB nodes in ways that you want. mib2c is a misnomer (for historical purposes), because you can produce anything (not just C code). Look in the Net-SNMP "local" directory for a bunch of example mib2c.*.conf files and behold the power before you.

## COMMANDS
All commands within mib2c.conf files are embraced by @ signs. Anything with an @ sign at the front and back of the line is generally supposed to be a mib2c specific command. These are detailed here:

@open FILE@

writes generated output to FILE note that for file specifications, opening '-' will print to stdout.

@append FILE@

appends the given FILE

@close FILE@

closes the given FILE

@push@

save the current outputs, then clear outputs. Use with @open@ and @pop@ to write to a new file without interfering with current outputs.

@pop@

pop up the process() stack one level. Use after a @push@ to return to the previous set of open files.

@foreach $VAR scalar@

repeat iterate over code until @end@ setting $VAR to all known scalars

@foreach $VAR table@

repeat iterate over code until @end@ setting $VAR to all known tables

@foreach $VAR column@

repeat iterate over code until @end@ setting $VAR to all known columns within a given table. Obviously this must be called within a foreach-table clause.

@foreach $VAR nonindex@

repeat iterate over code until @end@ setting $VAR to all known non-index columns within a given table. Obviously this must be called within a foreach-table clause.

@foreach $VAR internalindex@

repeat iterate over code until @end@ setting $VAR to all known internal index columns within a given table. Obviously this must be called within a foreach-table clause.

@foreach $VAR externalindex@

repeat iterate over code until @end@ setting $VAR to all known external index columns within a given table. Obviously this must be called within a foreach-table clause.

@foreach $VAR index@

repeat iterate over code until @end@ setting $VAR to all known indexes within a given table. Obviously this must be called within a foreach-table clause.

@foreach $VAR notifications@

repeat iterate over code until @end@ setting $VAR to all known notifications

@foreach $VAR varbinds@

repeat iterate over code until @end@ setting $VAR to all known varbinds Obviously this must be called within a foreach-notifications clause.

@foreach $LABEL, $VALUE enum@

repeat iterate over code until @end@ setting $LABEL and $VALUE to the label and values from the enum list.

@foreach $RANGE_START, $RANGE_END range NODE@

repeat iterate over code until @end@ setting $RANGE_START and $RANGE_END to the legal accepted range set for a given mib NODE.

@foreach $var stuff a b c d@

repeat iterate over values a, b, c, d as assigned generically (ie, the values are taken straight from the list with no mib-expansion, etc).

@while expression@

repeat iterate over code until the expression is false

@eval $VAR = expression@

evaluates expression and assigns the results to $VAR. This is not a full perl eval, but sort of a ""psuedo"" eval useful for simple expressions while keeping the same variable name space. See below for a full-blown export to perl.

@perleval STUFF@

evaluates STUFF directly in perl. Note that all mib2c variables interpereted within .conf files are in $vars{NAME} and that a warning will be printed if STUFF does not return 0. (adding a 'return 0;' at the end of STUFF is a workaround.

@startperl@

@endperl@

treats everything between these tags as perl code, and evaluates it.

@next@

restart foreach; should only be used inside a conditional. skips out of current conditional, then continues to skip to end for the current foreach clause.

@if expression@

evaluates expression, and if expression is true processes contained part until appropriate @end@ is reached. If the expression is false, the next @elsif expression@ expression (if it exists) will be evaluated, until an expression is true. If no such expression exists and an @else@ clause is found, it will be evaluated.

@ifconf file@

If the specified file can be found in the conf file search path, and if found processes contained part until an appropriate @end@ is found. As with a regular @if expression@, @elsif expression@ and @else@ can be used.

@ifdir dir@

If the specified directory exists, process contained part until an appropriate @end@ is found. As with a regular @if expression@, @elsif expression@ and @else@ can be used.

@define NAME@

@enddefine@

Memorizes ""stuff"" between the define and enddefine tags for later calling as NAME by @calldefine NAME@.

@calldefine NAME@

Executes stuff previously memorized as NAME.

@printf "expression" stuff1, stuff2, ...@

Like all the other printf's you know and love.

@run FILE@

Sources the contents of FILE as a mib2c file, but does not affect current files opened.

@include FILE@

Sources the contents of FILE as a mib2c file and appends its output to the current output.

@prompt $var QUESTION@

Presents the user with QUESTION, expects a response and puts it in $var

@print STUFF@

Prints stuff directly to the users screen (ie, not to where normal mib2c output goes)

@quit@

Bail out (silently)

@exit@

Bail out!

## VARIABLES
Variables in the mib2c language look very similar to perl variables, in that they start with a "$". They can be used for anything you want, but most typically they'll hold mib node names being processed by @foreach ...@ clauses.

They also have a special property when they are a mib node, such that adding special suffixes to them will allow them to be interpreted in some fashion. The easiest way to understand this is through an example. If the variable 'x' contained the word 'ifType' then some magical things happen. In mib2c output, anytime $x is seen it is replaced with "ifType". Additional suffixes can be used to get other aspects of that mib node though. If $x.objectID is seen, it'll be replaced by the OID for ifType: ".1.3.6.1.2.1.2.2.1.3". Other suffixes that can appear after a dot are listed below.

One last thing: you can use things like $vartext immediately ending in some other text, you can use {}s to get proper expansion of only part of the mib2c input. IE, $xtext will produce "$xtext", but ${x}text will produce "ifTypetext" instead.

$var.uc

all upper case version of $var

$var.objectID

dotted, fully-qualified, and numeric OID

$var.commaoid

comma separated numeric OID for array initialization

$var.oidlength

length of the oid

$var.subid

last number component of oid

$var.module

MIB name that the object comes from

$var.parent

contains the label of the parent node of $var.

$var.isscalar

returns 1 if var contains the name of a scalar

$var.iscolumn

returns 1 if var contains the name of a column

$var.children

returns 1 if var has children

$var.perltype

node's perl SYNTAX ($SNMP::MIB{node}{'syntax'})

$var.type

node's ASN_XXX type (Net-SNMP specific #define)

$var.decl

C data type (char, u_long, ...)

$var.readable

1 if an object is readable, 0 if not

$var.settable

1 if an object is writable, 0 if not

$var.creatable

1 if a column object can be created as part of a new row, 0 if not

$var.noaccess

1 if not-accessible, 0 if not

$var.accessible

1 if accessible, 0 if not

$var.storagetype

1 if an object is a StorageType object, 0 if not

$var.rowstatus

1 if an object is a RowStatus object, 0 if not 'settable', 'creatable', 'lastchange', 'storagetype' and 'rowstatus' can also be used with table variables to indicate whether it contains writable, creatable, LastChange, StorageType or RowStatus column objects

$var.hasdefval

returns 1 if var has a DEFVAL clause

$var.defval

node's DEFVAL

$var.hashint

returns 1 if var has a HINT clause

$var.hint

node's HINT

$var.ranges

returns 1 if var has a value range defined

$var.enums

returns 1 if var has enums defined for it.

$var.access

node's access type

$var.status

node's status

$var.syntax

node's syntax

$var.reference

node's reference

$var.description

node's description

## SEE ALSO
mib2c(1)


ethers

package: net-tools

title: ethers(5)

summary: Ethernet address to IP number database

text:
# ethers(5)

## NAME
ethers - Ethernet address to IP number database

## DESCRIPTION
/etc/ethers contains 48 bit Ethernet addresses and their corresponding IP numbers, one line for each IP number:

Ethernet-address IP-number

The two items are separated by any number of SPACE and/or TAB char acters. A # at the beginning of a line starts a comment which extends to the end of the line. The Ethernet-address is written as x:x:x:x:x:x, where x is a hexadecimal number between 0 and ff which represents one byte of the address, which is in network byte order (big-endian). The IP-number may be a hostname which can be resolved by DNS or a dot separated number.

## EXAMPLES
08:00:20:00:61:CA pal

## FILES
/etc/ethers


afp.conf

package: netatalk

title: afp.conf(5)

summary: Netatalk configuration file

text:
# afp.conf(5)

## NAME
afp.conf - Netatalk configuration file

## SYNOPSIS
The afp.conf file is the configuration file for the Netatalk AFP file server.

All AFP-specific configurations and AFP volume definitions are done via this file.

## FILE FORMAT
The file consists of sections and parameters. A section begins with the name of the section in square brackets and continues until the next section begins. Sections contain parameters of the form:

```
    name = value

```

The file is line-based - that is, each newline-terminated line represents either a comment, a section name or a parameter.

Section and parameter names are case sensitive.

Only the first equals sign in a parameter is significant. Whitespace before or after the first equals sign is discarded. Leading, trailing and internal whitespace in section and parameter names is irrelevant. Leading and trailing whitespace in a parameter value is discarded. Internal whitespace within a parameter value is retained verbatim.

Any line beginning with a semicolon (“;”) or a hash (“#”) character is ignored, as are lines containing only whitespace.

Any line ending in a “ \ ” is continued on the next line in the customary UNIX fashion.

The values following the equals sign in parameters are all either a string (no quotes needed) or a boolean, which may be given as yes/no, 1/0 or true/false. Case is not significant in boolean values, but is preserved in string values. Some items such as "file perm"s are numeric.

The parameter include = path allows you to include one config file inside another. The file is included literally, as though typed in place. Nested includes are not supported.

## SECTION DESCRIPTIONS
Each section in the configuration file (except for the [Global] section) describes a shared resource (known as a “volume”). The section name is the name of the volume and the parameters within the section define the volume attributes and options.

There are two special sections, [Global] and [Homes], which are described under special sections. The following notes apply to ordinary section descriptions.

A volume consists of a directory to which access is being given plus a description of the access rights which are granted to the user of the service. For volumes the path option must specify the directory to share.

Any volume section without path option is considered a vol preset which can be selected in other volume sections via the vol preset option and constitutes defaults for the volume. For any option specified both in a preset and in a volume section the volume section setting completely substitutes the preset option.

The access rights granted by the server are masked by the access rights granted to the specified or guest UNIX user by the host system. The server does not grant more access than the host system grants.

The following sample section defines an AFP volume. The user has full access to the path /foo/bar. The share is accessed via the share name baz:

```
 [baz]

    path = /foo/bar
```

## SPECIAL SECTIONS

### The [Global] section
Parameters in this section apply to the server as a whole. Parameters denoted by a (G) below are must be set in this section.

### The [Homes] section
This section enable sharing of the UNIX server user home directories. Specifying an optional path parameter means that not the whole user home will be shared but the subdirectory path. It is necessary to define the basedir regex option. It should be a regex which matches the parent directory of the user homes. Parameters denoted by a (H) belong to volume sections. The optional parameter home name can be used to change the AFP volume name which $u's home by default. See below under VARIABLE SUBSTITUTIONS.

The following example illustrates this. Given all user home directories are stored under /home:

```
 [Homes]

      path = afp-data

      basedir regex = /home
```

For a user john this results in an AFP home volume with a path of /home/john/afp-data.

If basedir regex contains symlink, set the canonicalized absolute path. When /home links to /usr/home:

```
 [Homes]

      basedir regex = /usr/home
```

## PARAMETERS
Parameters define the specific attributes of sections.

Some parameters are specific to the [Global] section (e.g., log type). All others are permissible only in volume sections. The letter G in parentheses indicates that a parameter is specific to the [Global] section. The letter V indicates that a parameter can be specified in a volume specific section.

## VARIABLE SUBSTITUTIONS
You can use variables in volume names. The use of variables in paths is limited to $u.

1.if you specify an unknown variable, it will not get converted.

2.if you specify a known variable, but that variable doesn't have a value, it will get ignored.

The variables which can be used for substitutions are:

$b

basename

$c

client's ip address

$d

volume pathname on server

$f

full name (contents of the gecos field in the passwd file)

$g

group name

$h

hostname

$i

client's ip, without port

$s

server name (this can be the hostname)

$u

user name (if guest, it is the user that guest is running as)

$v

volume name

$$

prints dollar sign ($)

## EXPLANATION OF GLOBAL PARAMETERS

### Authentication Options
ad domain = DOMAIN (G)

Append @DOMAIN to username when authenticating. Useful in Active Directory environments that otherwise would require the user to enter the full user@domain string.

admin auth user = user (G)

Specifying e.g. "admin auth user = root" whenever a normal user login fails, afpd will try to authenticate as the specified admin auth user. If this succeeds, a normal session is created for the original connecting user. Said differently: if you know the password of admin auth user, you can authenticate as any other user.

admin group = group (G)

Allows users of a certain group to be seen as the superuser when they log in. This option is disabled by default.

force user = USER (G)

This specifies a UNIX user name that will be assigned as the default user for all users connecting to this server. This is useful for sharing files. You should also use it carefully as using it incorrectly can cause security problems.

force group = GROUP (G)

This specifies a UNIX group name that will be assigned as the default primary group for all users connecting to this server.

k5 keytab = path (G), k5 service = service (G), k5 realm = realm (G)

These are required if the server supports the Kerberos 5 authentication UAM.

nt domain = DOMAIN (G), nt separator = SEPARATOR (G)

Use for e.g. winbind authentication, prepends both strings before the username from login and then tries to authenticate with the result through the available and active UAM authentication modules.

save password = BOOLEAN (default: yes) (G)

Enables or disables the ability of clients to save passwords locally.

set password = BOOLEAN (default: no) (G)

Enables or disables the ability of clients to change their passwords via chooser or the "connect to server" dialog.

uam list = uam list (G)

Space or comma separated list of UAMs. (The default is "uams_dhx.so uams_dhx2.so"). The most commonly used UAMs are:

uams_guest.so

allows guest logins

uams_clrtxt.so

(uams_pam.so or uams_passwd.so) Allow logins with passwords transmitted in the clear. (legacy)

uams_randnum.so

allows Random Number and Two-Way Random Number Exchange for authentication (requires a separate file containing the passwords, either the default afppasswd file or the one specified via "passwd file"). See afppasswd(1) for details. (legacy)

uams_dhx.so

(uams_dhx_pam.so or uams_dhx_passwd.so) Allow Diffie-Hellman eXchange (DHX) for authentication.

uams_dhx2.so

(uams_dhx2_pam.so or uams_dhx2_passwd.so) Allow Diffie-Hellman eXchange 2 (DHX2) for authentication.

uam_gss.so

Allow Kerberos V for authentication (optional)

uam path = path (G)

Sets the default path for UAMs for this server (default is /usr/local/lib/x86_64-linux-gnu/netatalk).

### Charset Options
With OS X Apple introduced the AFP3 protocol. One of the big changes was, that AFP3 uses Unicode names encoded as Decomposed UTF-8 (UTF8-MAC). Previous AFP/OS versions used charsets like MacRoman, MacCentralEurope, etc.

To be able to serve AFP3 and older clients at the same time, afpd needs to be able to convert between UTF-8 and Mac charsets. Even OS X clients partly still rely on the mac charset. As there's no way, afpd can detect the codepage a pre AFP3 client uses, you have to specify it using the mac charset option. The default is MacRoman, which should be fine for most western users.

As afpd needs to interact with UNIX operating system as well, it needs to be able to convert from UTF8-MAC / Mac charset to the UNIX charset. By default afpd uses UTF8. You can set the UNIX charset using the unix charset option. If you're using extended characters in the configuration files for afpd, make sure your terminal matches the unix charset.

mac charset = CHARSET (G)/(V)

Specifies the Mac clients charset, e.g. MAC_ROMAN. This is used to convert strings and filenames to the clients codepage for OS9 and Classic, i.e. for authentication and AFP messages (SIGUSR2 messaging). This will also be the default for the volumes mac charset. Defaults to MAC_ROMAN.

unix charset = CHARSET (G)

Specifies the servers unix charset, e.g. ISO-8859-15 or EUC-JP. This is used to convert strings to/from the systems locale, e.g. for authentication, server messages and volume names. If LOCALE is set, the systems locale is used. Defaults to UTF8.

vol charset = CHARSET (G)/(V)

Specifies the encoding of the volumes filesystem. By default, it is the same as unix charset.

### Password Options
passwd file = path (G)

Sets the path to the Randnum UAM passwd file for this server.

passwd minlen = number (G)

Sets the minimum password length, if supported by the UAM

### Network Options
advertise ssh = BOOLEAN (default: no) (G)

Allows old Mac OS X clients (10.3.3-10.4) to automagically establish a tunneled AFP connection through SSH. If this option is set, the server's answers to client's FPGetSrvrInfo requests contain an additional entry. It depends on both client's settings and a correctly configured and running sshd(8) on the server to let things work.

Note

Setting this option is not recommended since globally encrypting AFP connections via SSH will increase the server's load significantly. On the other hand, Apple's client side implementation of this feature in MacOS X versions prior to 10.3.4 contained a security flaw.

afp interfaces = name [name ...] (G)

Specifies the network interfaces that the server should listens on. The default is advertise the first IP address of the system, but to listen for any incoming request.

afp listen = ip address[:port] [ip address[:port] ...] (G)

Specifies the IP address that the server should advertise and listens to. The default is advertise the first IP address of the system, but to listen for any incoming request. The network address may be specified either in dotted-decimal format for IPv4 or in hexadecimal format for IPv6. IPv6 address + port combination must use URL the format using square brackets [IPv6]:port

afp port = port number (G)

Allows a different TCP port to be used for AFP. The default is 548. Also sets the default port applied when none specified in an afp listen option.

cnid listen = ip address[:port] [ip address[:port] ...] (G)

Specifies the IP address that the CNID server should listen on. The default is localhost:4700.

disconnect time = number (G)

Keep disconnected AFP sessions for number hours before dropping them. Default is 24 hours.

dsireadbuf = number (G)

Scale factor that determines the size of the DSI/TCP readahead buffer, default is 12. This is multiplies with the DSI server quantum (default 1MiB) to give the size of the buffer. Increasing this value might increase throughput in fast local networks for volume to volume copies. Note: This buffer is allocated per afpd child process, so specifying large values will eat up large amount of memory (buffer size * number of clients).

fqdn = name[:port] (G)

Specifies a fully-qualified domain name, with an optional port. This is discarded if the server cannot resolve it. This option is not honored by AppleShare clients <= 3.8.3. This option is disabled by default. Use with caution as this will involve a second name resolution step on the client side. Also note that afpd will advertise this name:port combination but not automatically listen to it.

hostname = name (G)

Use this instead of the result from calling hostname for determining which IP address to advertise, therefore the hostname is resolved to an IP which is the advertised. This is NOT used for listening and it is also overwritten by afp listen.

max connections = number (G)

Sets the maximum number of clients that can simultaneously connect to the server (default is 200).

server quantum = number (G)

This specifies the DSI server quantum. The default value is 0x100000 (1 MiB). The maximum value is 0xFFFFFFFFF, the minimum is 32000. If you specify a value that is out of range, the default value will be set. Do not change this value unless you're absolutely sure, what you're doing

sleep time = number (G)

Keep sleeping AFP sessions for number hours before disconnecting clients in sleep mode. Default is 10 hours.

tcprcvbuf = number (G)

Try to set TCP receive buffer using setsockopt(). Often OSes impose restrictions on the applications ability to set this value.

tcpsndbuf = number (G)

Try to set TCP send buffer using setsockopt(). Often OSes impose restrictions on the applications ability to set this value.

recvfile = BOOLEAN (default: no) (G)

Whether to use splice() on Linux for receiving data.

splice size = number (default: 64k) (G)

Maximum number of bytes spliced.

use sendfile = BOOLEAN (default: yes) (G)

Whether to use sendfile syscall for sending file data to clients.

zeroconf = BOOLEAN (default: yes) (G)

Whether to use automatic Zeroconf service registration if Avahi or mDNSResponder were compiled in.

### Miscellaneous Options
afp read locks = BOOLEAN (default: no) (G)

Whether to apply locks to the byte region read in FPRead calls. The AFP spec mandates this, but it's not really in line with UNIX semantics and is a performance hug.

afpstats = BOOLEAN (default: no) (G)

Whether to provide AFP runtime statistics (connected users, open volumes) via dbus.

basedir regex = regex (H)

Regular expression which matches the parent directory of the user homes. If basedir regex contains symlink, you must set the canonicalized absolute path. In the simple case this is just a path i.e. basedir regex = /home

chmod request = preserve (default) | ignore | simple (G)/(V)

Advanced permission control that deals with ACLs.

•ignore - UNIX chmod() requests are completely ignored, use this option to allow the parent directory's ACL inheritance full control over new items.

•preserve - preserve ZFS ACEs for named users and groups or POSIX ACL group mask

•simple - just to a chmod() as requested without any extra steps

close vol = BOOLEAN (default: no) (G)

Whether to close volumes possibly opened by clients when they're removed from the configuration and the configuration is reloaded.

cnid mysql host = MySQL server address (G)

name or address of a MySQL server for use with the mysql CNID backend.

cnid mysql user = MySQL user (G)

MySQL user for authentication with the server.

cnid mysql pw = password (G)

Password for MySQL server.

cnid mysql db = database name (G)

Name of an existing database for which the specified user has full privileges.

cnid server = ipaddress[:port] (G)/(V)

Specifies the IP address and port of a cnid_metad server, required for CNID dbd backend. Defaults to localhost:4700. The network address may be specified either in dotted-decimal format for IPv4 or in hexadecimal format for IPv6.-

dbus daemon = path (G)

Sets the path to dbus-daemon binary used by Spotlight feature. The default value ["/bin/dbus-daemon"] is determined when building netatalk.

dircachesize = number (G)

Maximum possible entries in the directory cache. The cache stores directories and files. It is used to cache the full path to directories and CNIDs which considerably speeds up directory enumeration. Default size is 8192, maximum size is 131072. Given value is rounded up to nearest power of 2. Each entry takes about 100 bytes, which is not much, but remember that every afpd child process for every connected user has its cache.

extmap file = path (G)

Sets the path to the file which defines file extension type/creator mappings.

force xattr with sticky bit = BOOLEAN (default: no) (G/V)

Writing metadata xattr on directories with the sticky bit set may fail even though we may have write access to a directory, because if the sticky bit is set only the owner is allowed to write xattrs. By enabling this option Netatalk will write the metadata xattr as root.

guest account = name (G)

Specifies the user that guests should use (default is nobody). The name must be a valid user on the host system.

home name = name (H)

AFP user home volume name. The default is $u's home. The name must contain "$u".

ignored attributes = all | nowrite | nodelete | norename (G)/(V)

Specify a set of file and directory attributes that shall be ignored by the server, all includes all the other options. In OS X when the Finder sets a lock on a file/directory or you set the BSD uchg flag in the Terminal, all three attributes are used. Thus in order to ignore the Finder lock/BSD uchg flag, add set ignored attributes = all.

login message = message (G)/(V)

Sets a message to be displayed when clients logon to the server. The message should be in unix charset. Extended characters are allowed.

mimic model = model (G)

Specifies a custom icon for the mounted AFP volume on macOS / Mac OS X clients. Default is to let macOS choose. Requires netatalk to be built with Zeroconf. Examples:

•Laptop

•RackMount

•Tower

A complete set of supported model codes by a macOS client can be found by inspecting /System/Library/CoreServices/CoreTypes.bundle/Contents/Info.plist (as of macOS 14 Sonoma).

signature = STRING (G)

Specify a server signature. The maximum length is 16 characters. This option is useful for clustered environments, to provide fault isolation etc. By default, afpd generates a signature and saves it to a file called afp_signature.conf automatically (based on random numbers). See also asip-status(1).

solaris share reservations = BOOLEAN (default: yes) (G)

Use share reservations on Solaris. Solaris CIFS server uses this too, so this makes a lock coherent multi protocol server.

sparql results limit = NUMBER (default: UNLIMITED) (G)

Impose a limit on the number of results queried from Tracker via SPARQL queries.

spotlight = BOOLEAN (default: no) (G)/(V)

Whether to enable Spotlight searches. Note: once the global option is enabled, any volume that is not enabled won't be searchable at all. See also dbus daemon option.

spotlight attributes = COMMA SEPARATED STRING (default: EMPTY) (G)

A list of attributes that are allowed to be used in Spotlight searches. By default all attributes can be searched, passing a string limits attributes to elements of the string. Example:

```
spotlight attributes = *,kMDItemTextContent
```

spotlight expr = BOOLEAN (default: yes) (G)

Whether to allow the use of logic expression in searches.

start dbus = BOOLEAN (default: yes) (G)

Whether to start a dbus instance for use with Tracker.

start tracker = BOOLEAN (default: yes) (G)

Whether to start Tracker with "tracker daemon -s". In case of old Tracker, "tracker-control -s" is used instead.

veto message = BOOLEAN (default: no) (G)

Send optional AFP messages for vetoed files. Then whenever a client tries to access any file or directory with a vetoed name, it will be sent an AFP message indicating the name and the directory.

vol dbpath = path (G)/(V)

Sets the path where the database information will be stored. You have to specify a writable location, even if the volume is read only.

vol dbnest = BOOLEAN (default: no) (G)

Setting this option to true brings back Netatalk 2 behaviour of storing the CNID database in a folder called .AppleDB inside the volume root of each share.

volnamelen = number (G)

Max length of UTF8-MAC volume name for Mac OS X. Note that Hangul is especially sensitive to this.

```
73: limit of Mac OS X 10.1
80: limit of Mac OS X 10.4/10.5 (default)
255: limit of recent Mac OS X
```

Mac OS 9 and earlier are not influenced by this, because Maccharset volume name is always limited to 27 bytes.

vol preset = name (G)/(V)

Use section name as option preset for all volumes (when set in the [Global] section) or for one volume (when set in that volume's section).

zeroconf name = name (G)

Specifies a human-readable name that uniquely describes registered services. The zeroconf name is advertised as UTF-8, up to 63 octets (bytes) in length. Defaults to hostname. Note that netatalk must support Zeroconf.

### Logging Options
log file = logfile (G)

Write logs to logfile on the file system. If not specified, Netatalk logs to the syslog daemon facility.

log level = type:level [type:level ...] (G), log level = type:level,[type:level, ...] (G)

Specify that any message of a loglevel up to the given log level should be logged. By default afpd logs to syslog with a default logging setup equivalent to default:note

logtypes: default, afpdaemon, logger, uamsdaemon

loglevels: severe, error, warn, note, info, debug, debug6, debug7, debug8, debug9, maxdebug

Note

Both logtype and loglevels are case insensitive.

log microseconds = BOOLEAN (default: yes) (G)

Log timestamps with accuracy down to microseconds. If disabled, the timestamps record only whole seconds. Only takes effect when used in tandem with the log file option.

### Filesystem Change Events (FCE)
Netatalk includes a nifty filesystem change event mechanism where afpd processes notify interested listeners about certain filesystem event by UDP network datagrams.

The following FCE events are defined:

•file modification (fmod)

•file deletion (fdel)

•directory deletion (ddel)

•file creation (fcre)

•directory creation (dcre)

•file move or rename (fmov)

•directory move or rename (dmov)

•login (login)

•logout (logout)

fce listener = host[:port] (G)

Enables sending FCE events to the specified host, default port is 12250 if not specified. Specifying multiple listeners is done by having this option once for each of them.

fce version = 1|2 (G)

FCE protocol version, default is 1. You need version 2 for the fmov, dmov, login or logout events.

fce events = fmod,fdel,ddel,fcre,dcre,fmov,dmov,login,logout (G)

Specifies which FCE events are active, default is fmod,fdel,ddel,fcre,dcre.

fce coalesce = all|delete|create (G)

Coalesce FCE events.

fce holdfmod = seconds (G)

This determines the time delay in seconds which is always waited if another file modification for the same file is done by a client before sending an FCE file modification event (fmod). For example saving a file in Photoshop would generate multiple events by itself because the application is opening, modifying and closing a file multiple times for every "save". Default: 60 seconds.

fce sendwait = milliseconds (G)

Defines a delay in milliseconds between the emission of each FCE event. Use this if you are experiencing lost FCE events when creating or deleting a very large number of files at once. The deluge of events that such an operation triggers can lead to UDP buffer overflow and subsequently to packet loss. Has to be a number between 0 and 999. Default: 0 milliseconds.

fce ignore names = NAME[/NAME2/...] (G)

Slash delimited list of filenames for which FCE events shall not be generated. Default: .DS_Store.

fce ignore directories = NAME[,NAME2,...] (G)

Comma delimited list of directories for which FCE events shall not be generated. Default: empty.

fce notify script = PATH (G)

Script which will be executed for every FCE event, see contrib/shell_utils/fce_ev_script.sh from the Netatalk sources for an example script.

### Debug Parameters
These options are useful for debugging only.

tickleval = number (G)

Sets the tickle timeout interval (in seconds). Defaults to 30.

timeout = number (G)

Specify the number of tickles to send before timing out a connection. The default is 4, therefore a connection will timeout after 2 minutes.

client polling = BOOLEAN (default: no) (G)

With this option enabled, afpd won't advertise that it is capable of server notifications, so that connected clients poll the server every 10 seconds to detect changes in opened server windows. Note: Depending on the number of simultaneously connected clients and the network's speed, this can lead to a significant higher load on your network! Do not use this option any longer as present Netatalk correctly supports server notifications, allowing connected clients to update folder listings in case another client changed the contents.

### Options for ACL handling
By default, the effective permission of the authenticated user are only mapped to the mentioned UARights permission structure, not the UNIX mode. You can adjust this behaviour with the configuration option map acls:

map acls = none|rights|mode (G)

none

no mapping of ACLs

rights

effective permissions are mapped to UARights structure. This is the default.

mode

ACLs are additionally mapped to the UNIX mode of the filesystem object.

If you want to be able to display ACLs on the client, you must setup both client and server as part on a authentication domain (directory service, e.g. LDAP, Open Directory, Active Directory). The reason is, in OS X ACLs are bound to UUIDs, not just uid's or gid's. Therefore Netatalk must be able to map every filesystem uid and gid to a UUID so that it can return the server side ACLs which are bound to UNIX uid and gid mapped to OS X UUIDs.

Netatalk can query a directory server using LDAP queries. Either the directory server already provides an UUID attribute for user and groups (Active Directory, Open Directory) or you reuse an unused attribute (or add a new one) to you directory server (eg OpenLDAP).

The following LDAP options must be configured for Netatalk:

ldap auth method = none|simple|sasl (G)

Authentication method: none | simple | sasl none

anonymous LDAP bind

simple

simple LDAP bind

sasl

SASL. Not yet supported !

ldap auth dn = dn (G)

Distinguished Name of the user for simple bind.

ldap auth pw = password (G)

Password for simple bind.

ldap uri = ldap://somehost:1234/ (G)

Specifies the LDAP URI of the server to connect to. The URI scheme may be ldap, ldapi or ldaps, specifying LDAP over TCP, ICP or TLS respectively (if supported by the LDAP library). This is only needed for explicit ACL support in order to be able to query LDAP for UUIDs. You can use afpldaptest(1) to syntactically check your config.

ldap userbase = base dn (G)

DN of the user container in LDAP.

ldap userscope = scope (G)

Search scope for user search: base | one | sub

ldap groupbase = base dn (G)

DN of the group container in LDAP.

ldap groupscope = scope (G)

Search scope for group search: base | one | sub

ldap uuid attr = dn (G)

Name of the LDAP attribute with the UUIDs. Note: this is used both for users and groups.

ldap name attr = dn (G)

Name of the LDAP attribute with the users short name.

ldap group attr = dn (G)

Name of the LDAP attribute with the groups short name.

ldap uuid string = STRING (G)

Format of the uuid string in the directory. A series of x and -, where every x denotes a value 0-9a-f and every - is a separator. Default: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

ldap uuid encoding = string | ms-guid (default: string) (G)

Format of the UUID of the LDAP attribute, allows usage of the binary objectGUID fields from Active Directory. If left unspecified, string is the default, which passes through the ASCII UUID returned by most other LDAP stores. If set to ms-guid, the internal UUID representation is converted to and from the binary format used in the objectGUID attribute found on objects in Active Directory when interacting with the server. See also the options ldap user filter and ldap group filter.

string

UUID is a string, use with e.g. OpenDirectory.

ms-guid

Binary objectGUID from Active Directory

ldap user filter = STRING (default: unused) (G)

Optional LDAP filter that matches user objects. This is necessary for Active Directory environments where users and groups are stored in the same directory subtree. Recommended setting for Active Directory: objectClass=user.

ldap group filter = STRING (default: unused) (G)

Optional LDAP filter that matches group objects. This is necessary for Active Directory environments where users and groups are stored in the same directory subtree. Recommended setting for Active Directory: objectClass=group.

## EXPLANATION OF VOLUME PARAMETERS

### Parameters
The section name defines the volume name. No two volumes may have the same name. The volume name cannot contain the ':' character. The volume name is mangled if it is very long. Mac charset volume name is limited to 27 characters. UTF8-MAC volume name is limited to volnamelen parameter.

path = PATH (V)

The path name must be a fully qualified path name.

appledouble = ea|v2 (V)

Specify the format of the metadata files, which are used for saving Mac resource fork as well. Earlier versions used AppleDouble v2, the new default format is ea.

vol size limit = size in MiB (V)

Useful for Time Machine: limits the reported volume size, thus preventing Time Machine from using the whole real disk space for backup. Example: "vol size limit = 1000" would limit the reported disk space to 1 GB. IMPORTANT: This is an approximated calculation taking into account the contents of Time Machine sparsebundle images. Therefore you MUST NOT use this volume to store other content when using this option, because it would NOT be accounted for. The calculation works by reading the band size from the Info.plist XML file of the sparsebundle, reading the bands/ directory counting the number of band files, and then multiplying one with the other.

valid users = user @group (V)

The allow option allows the users and groups that access a share to be specified. Users and groups are specified, delimited by spaces or commas. Groups are designated by a @ prefix. Example:

```
valid users = user @group
```

invalid users = users/groups (V)

The deny option specifies users and groups who are not allowed access to the share. It follows the same format as the "valid users" option.

hosts allow = IP host address/IP netmask bits [ ... ] (V)

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. Example: hosts allow = 10.1.0.0/16 10.2.1.100 2001:0db8:1234::/48

hosts deny = IP host address/IP netmask bits [ ... ] (V)

Listed hosts and nets are rejected, all others are allowed. Example: hosts deny = 192.168.100/24 10.1.1.1 2001:db8::1428:57ab

cnid scheme = backend (V)

set the CNID backend to be used for the volume, default is ["dbd"] available schemes: ["dbd last mysql"]

ea = none|auto|sys|ad|samba (V)

Specify how Extended Attributes are stored. auto is the default. auto

Try sys (by setting an EA on the shared directory itself), fallback to ad. Requires writable volume for performing test. "read only = yes" overwrites auto with none. Use explicit "ea = sys|ad" for read-only volumes where appropriate.

sys

Use filesystem Extended Attributes.

samba

Use filesystem Extended Attributes, but append a 0 byte to each xattr in order to be compatible with Samba's vfs_streams_xattr.

ad

Use files in .AppleDouble directories.

none

No Extended Attributes support.

mac charset = CHARSET (V)

specifies the Mac client charset for this Volume, e.g. MAC_ROMAN, MAC_CYRILLIC. If not specified the global setting is applied. This setting is only required if you need volumes, where the Mac charset differs from the one globally set in the [Global] section.

casefold = option (V)

The casefold option handles, if the case of filenames should be changed. The available options are: 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.

password = password (V)

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).

file perm = mode (V), directory perm = mode (V)

Add(or) with the client requested permissions: file perm is for files only, directory perm is for directories only. Don't use with "unix priv = no". Example. Volume for a collaborative workgroup

```
file perm = 0660 directory perm =

              0770
```

umask = mode (V)

set perm mask. Don't use with "unix priv = no".

preexec = command (V)

command to be run when the volume is mounted

postexec = command (V)

command to be run when the volume is closed

root preexec = command (V)

command to be run as root when the volume is mounted

root postexec = command (V)

command to be run as root when the volume is closed

rolist = users/groups (V)

Allows certain users and groups to have read-only access to a share. This follows the allow option format.

rwlist = users/groups (V)

Allows certain users and groups to have read/write access to a share. This follows the allow option format.

veto files = vetoed names (V)

hide files and directories,where the path matches one of the '/' delimited vetoed names. The veto string must always be terminated with a '/', e.g. "veto files = veto1/", "veto files = veto1/veto2/".

### Volume options
Boolean volume options.

acls = BOOLEAN (default: yes) (V)

Whether to flag volumes as supporting ACLs. If ACL support is compiled in, this is yes by default.

case sensitive = BOOLEAN (default: yes) (V)

Whether to flag volumes as supporting case-sensitive filenames. If the filesystem is case-insensitive, set to no. However, it is not fully verified.

Note

In spite of being case sensitive as a matter of fact, netatalk 3.1.3 and earlier did not notify kCaseSensitive flag to the client. Starting with 3.1.4, it is notified correctly by default.

cnid dev = BOOLEAN (default: yes) (V)

Whether to use the device number in the CNID backends. Helps when the device number is not constant across a reboot, e.g. cluster, ...

convert appledouble = BOOLEAN (default: yes) (V)

Whether automatic conversion from appledouble = v2 to appledouble = ea is performed when accessing filesystems from clients. This is generally useful, but costs some performance. It's recommendable to run dbd on volumes and do the conversion with that. Then this option can be set to no.

delete veto files = BOOLEAN (default: no) (V)

This option is used when Netatalk is attempting to delete a directory that contains one or more vetoed files or directories (see the veto files option). If this option is set to no (the default) then if a directory contains any non-vetoed files or directories then the directory delete will fail. This is usually what you want. If this option is set to yes, then Netatalk will attempt to recursively delete any files and directories within the vetoed directory.

follow symlinks = BOOLEAN (default: no) (V)

The default setting is false thus symlinks are not followed on the server. This is the same behaviour as OS X's AFP server. Setting the option to true causes afpd to follow symlinks on the server. symlinks may point outside of the AFP volume, currently afpd doesn't do any checks for "wide symlinks".

Note

This option will subtly break when the symlinks point across filesystem boundaries.

invisible dots = BOOLEAN (default: no) (V)

make dot files invisible. WARNING: enabling this option will lead to unwanted sideeffects were OS X applications when saving files to a temporary file starting with a dot first, then renaming the temp file to its final name, result in the saved file being invisible. The only thing this option is useful for is making files that start with a dot invisible on Mac OS 9. It's completely useless on Mac OS X, as both in Finder and in Terminal files starting with a dot are hidden anyway.

network ids = BOOLEAN (default: yes) (V)

Whether the server support network ids. Setting this to no will result in the client not using ACL AFP functions.

preexec close = BOOLEAN (default: no) (V)

A non-zero return code from preexec close the volume being immediately, preventing clients to mount/see the volume in question.

read only = BOOLEAN (default: no) (V)

Specifies the share as being read only for all users. Overwrites ea = auto with ea = none

root preexec close= BOOLEAN (default: no) (V)

A non-zero return code from root_preexec closes the volume immediately, preventing clients to mount/see the volume in question.

search db = BOOLEAN (default: no) (V)

Use fast CNID database namesearch instead of slow recursive filesystem search. Relies on a consistent CNID database, i.e. Samba or local filesystem access lead to inaccurate or wrong results. Works only for "dbd" CNID db volumes.

stat vol = BOOLEAN (default: yes) (V)

Whether to stat volume path when enumerating volumes list, useful for automounting or volumes created by a preexec script.

time machine = BOOLEAN (default: no) (V)

Whether to enable Time Machine support for this volume.

unix priv = BOOLEAN (default: yes) (V)

Whether to use AFP3 UNIX privileges. This should be set for OS X clients. See also: file perm, directory perm and umask.

## CNID BACKENDS
The AFP protocol primarily refers to files and directories by ID and not by name. Netatalk needs a way to store these IDs in a persistent way. To achieve this, Netatalk provides multiple CNID backends with different capabilities. The CNID databases are by default located under localstatedir.

dbd

Access to the CNID database is restricted to the cnid_metad daemon process. afpd 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 cdb

last

This backend is an exception, in terms of ID persistency. ID's are only valid for the current session. This is basically what afpd did in the 1.5 (and 1.6) versions. This backend is still available, as it is useful for e.g. sharing cdroms. Starting with Netatalk 3.0, it becomes the read only mode automatically. 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. This version now uses UTF-8 as the default encoding for names. '/' will be converted to ':'.

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 would be converted as to :xx notation as well. '/' would be encoded to :2f, a leading dot '.' might be encoded as :2e.

The vol charset option will allow you to select another volume encoding. afpd will accept any iconv(1) provided charset. It is highly recommended to stick to the default UTF-8.

## SEE ALSO
afpd(8), afppasswd(5), afp_signature.conf(5), extmap.conf(5), cnid_metad(8)

## AUTHOR
See CONTRIBUTORS[1]

## NOTES
1.

CONTRIBUTORS

https://github.com/Netatalk/netatalk/blob/main/CONTRIBUTORS


title: afp_signature.conf(5)

text:
# afp_signature.conf(5)

## NAME
afp_signature.conf - Configuration file used by afpd(8) to specify server signature

## DESCRIPTION
afp_signature.conf is the configuration file used by afpd to specify server signature automagically. The configuration lines are composed like:

"server-name" hexa-string

The first field is server name. Server names must be quoted if they contain spaces. The second field is the hexadecimal string of 32 characters for 16-bytes server signature.

The leading spaces and tabs are ignored. Blank lines are ignored. The lines prefixed with # are ignored. The illegal lines are ignored.

Note

Server Signature is unique 16-bytes identifier used to prevent logging on to the same server twice.

Netatalk 2.0 and earlier generated server signature by using gethostid(). There was a problem that another servers have the same signature because the hostid is not unique enough.

Current netatalk generates the signature from random numbers and saves it into afp_signature.conf. When starting next time, it is read from this file.

This file should not be thoughtlessly edited and be copied onto another server. If it wants to set the signature intentionally, use the option "signature =" in afp.conf. In this case, afp_signature.conf is not used.

## EXAMPLES
Example. afp_signature.conf

```
# This is a comment.
"My Server" 74A0BB94EC8C13988B2E75042347E528
```

## SEE ALSO
afpd(8), afp.conf(5), asip-status(1)

## AUTHOR
See CONTRIBUTORS[1]

## NOTES
1.

CONTRIBUTORS

https://github.com/Netatalk/netatalk/blob/main/CONTRIBUTORS


title: afp_voluuid.conf(5)

text:
# afp_voluuid.conf(5)

## NAME
afp_voluuid.conf - Configuration file used by afpd(8) to specify UUID for AFP volumes

## DESCRIPTION
afp_voluuid.conf is the configuration file used by afpd to specify UUID of all AFP volumes. The configuration lines are composed like:

"volume-name" uuid-string

The first field is volume name. Volume names must be quoted if they contain spaces. The second field is the 36 character hexadecimal ASCII string representation of a UUID.

The leading spaces and tabs are ignored. Blank lines are ignored. The lines prefixed with # are ignored. The illegal lines are ignored.

Note

This UUID is advertised by Zeroconf in order to provide robust disambiguation of Time Machine volumes.

It is also used by the MySQL CNID backend.

This file should not be thoughtlessly edited and be copied onto another server.

## EXAMPLES
Example. afp_voluuid.conf with three volumes

```
# This is a comment.
"Backup for John Smith" 1573974F-0ABD-69CC-C40A-8519B681A0E1
"bob" 39A487F4-55AA-8240-E584-69AA01800FE9
mary 6331E2D1-446C-B68C-3066-D685AADBE911
```

## SEE ALSO
afpd(8), afp.conf(5), avahi-daemon(8), mDNSResponder(8)

## AUTHOR
See CONTRIBUTORS[1]

## NOTES
1.

CONTRIBUTORS

https://github.com/Netatalk/netatalk/blob/main/CONTRIBUTORS


extmap.conf

title: extmap.conf(5)

text:
# extmap.conf(5)

## NAME
extmap.conf - Configuration file used by afpd(8) to specify file name extension mappings.

## SYNOPSIS
extmap.conf

## DESCRIPTION
extmap.conf is the configuration file used by afpd to specify file name extension mappings.

The configuration lines are composed like:

.extension [ type [ creator ] ]

Any line beginning with a hash (“#”) character is ignored. The leading-dot lines specify file name extension mappings. The extension '.' sets the default creator and type for otherwise untyped Unix files.

## EXAMPLES
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
afp.conf(5), afpd(8)

## AUTHOR
See CONTRIBUTORS[1]

## NOTES
1.

CONTRIBUTORS

https://github.com/Netatalk/netatalk/blob/main/CONTRIBUTORS