AFPD(8)
π NAME π
afpd β the Apple Filing Protocol daemon, aka the main character of your file server π
β¨ SYNOPSIS β¨
afpd [-d] [-F configfile]
afpd [-v | -V | -h]
π¦ DESCRIPTION π¦
okay so bestie, afpd is the whole vibe: it hands out an Apple Filing Protocol (AFP) interface to your plain old Unix file system π. It's normally started up at boot time by netatalk(8), so you don't usually have to yell at it yourself.
And the config file that tells afpd how to behave and how your file server is set up? That's afp.conf, no cap πβ¨
π OPTIONS π
-dβ Do not disassociate the daemon from the terminal. It stays right there with you, holding your hand π«Ά-vβ Print version information and dip. Bye π-Vβ Print verbose information and dip. Extra chatty edition π¬-hβ Print help and dip. Your lil cheat sheet π§-Fconfigfile β Specifies the configuration file to use. Pick your own adventure πΊοΈ
π SIGNALS π
Real talk first: if you wanna shut down a user's afpd process, please do NOT use SIGKILL (-9) unless it's genuinely your absolute last resort π that can leave the CNID database in an inconsistent state, and nobody wants that mess. The safe way is to send it a SIGTERM (-15) and justβ¦ wait for it to die on its own. Let it go gracefully, periodt β¨
Also important: SIGTERM and SIGUSR1 that get sent to the parent afpd process get propagated down to the children, so every process will be affected. Family meeting π£
SIGTERMβ Clean exit. Propagates from parent to children. Respectful, tidy, iconic πSIGQUITβ Sending this to the parentafpdwill cause it to exit, but leaving all children running! Sounds chaotic but it's on purpose: you can use this to implement an AFP service without downtime π₯ (no downtime?? slay.)SIGHUPβ Sending aSIGHUPtoafpdwill cause it to reload its configuration files. Glow-up, but for configs π¦SIGINTβ Sending aSIGINTto a childafpdenablesmax_debuglogging and dumps caches to the system tmp directory:- Debug log:
afpd.PID.XXXXXX - Directory cache:
dircache.PID
- Debug log:
Directory cache dump (see dircache mode in afp.conf(5)):
- LRU mode: Single queue of cached entries
- ARC mode: T1/T2 (cached), B1/B2 (ghost) lists, parameter p, statistics
Sending another SIGINT reverts to original log settings. Undo button fr π
SIGUSR1β Theafpdprocess will send the message βThe server is going down for maintenance.β to the client and shut itself down in 5 minutes β³. New connections are not allowed. If this is sent to a childafpd, the other children are not affected. However, the main process will still exit, disabling all new connections. Heads up bestie, that part matters πSIGUSR2β Send a server message to the AFP client of a childafpdprocess. When the signal is received,afpdlooks in the message directory (default:LOCALSTATEDIR/netatalk/msg/; the compiled-in path is printed byafpd -V) for a message file in the following order:message.PIDβ a file whose name ends with the child process IDmessageβ a fallback used when no PID-specific file is found
The contents of the file are read and forwarded to the connected AFP client as a server message. The file is deleted after it is read. This signal must only be sent to a child afpd process. The parent afpd does not install a SIGUSR2 handler, so sending it there will terminate the parent process and prevent new connections π (not the vibe. do not do this.)
Example usage:
# Find the child afpd PID for the connected user, then:
echo "Scheduled maintenance tonight at 22:00" \
> LOCALSTATEDIR/netatalk/msg/message.PID
kill -USR2 PID
πΈ FILES πΈ
afp.confβ configuration file used byafpdπextmap.confβ file name extension mapping ποΈafp_signature.confβ list of server signatures βοΈafp_voluuid.confβ list of UUIDs for Time Machine volumes β°LOCALSTATEDIR/netatalk/msg/message.PID,LOCALSTATEDIR/netatalk/msg/messageβ Server message files read onSIGUSR2. The PID-specific form (message.PID) targets a single connected client; the plainmessageform is a fallback when no PID-specific file exists. Both are deleted after being read. The compiled-in directory path is printed byafpd -Vπ
π SEE ALSO π
netatalk(8), hosts_access(5), afp.conf(5), afp_signature.conf(5), afp_voluuid.conf(5), extmap.conf(5), dbd(1)
π«Ά AUTHOR π«Ά
Contributors to the Netatalk Project (https://netatalk.io/contributors) β kings and queens, honestly π
and that's the whole page bestie!! this is Netatalk 4.5.1, page AFPD(8) β go forth and server responsibly πβ¨π
π¦ where this page comes from
- ubuntu stonking: netatalk 4.5.1~ds-1 Β· MIT~UMICH
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms