FCE_EV_SCRIPT(8)
π FCE_EV_SCRIPT(8) β the Netatalk AFP Fileserver Manual, bestie edition π
okay so first things first: this is fce_ev_script, from the Netatalk AFP Fileserver Manual, section 8. She's a little helper script and honestly she's carrying the whole notification department. Let's get into it β¨
πΈ NAME πΈ
fce_ev_script β the Netatalk Filesystem Change Events notification helper. that's her. that's the whole job. she notifies. she slays. periodt π
π¦ SYNOPSIS π¦
fce_ev_script [-h] [-v version] [-e event] [-i id] [-P path] [-S source]
[-p pid] [-u user]
like, she takes a bunch of flags and she does the thing. no cap π«Ά
π DESCRIPTION π
fce_ev_script is a notification helper for Netatalk's Filesystem Change Event (FCE) mechanism. she's literally designed to be plugged into the fce notify script option over in afp.conf. match made in heaven tbh π₯°
so here's the lore: when afpd emits an FCE event and fce notify script is configured, afpd runs the configured script in the background and hands it all the event details as command-line options. passing notes in class, but make it infrastructure π
by default, fce_ev_script writes events to syslog with the tag netatalk-fce. but if the NETATALK_FCE_LOG_FILE environment variable is set, events get appended to that file instead. choose your own adventure, bestie β¨
Note: this utility requires netatalk to be built with FCE support enabled β that's the -Dwith-fce=true meson build option, which is enabled by default. so like, unless someone went out of their way to turn it off, you're good π
β¨ OPTIONS β¨
-hβ show help text and exit. the "hey what does this do" button π-vversion β FCE script argument version.-eevent β FCE event name, such asFCE_FILE_CREATE. yes it's giving very specific π-iid β FCE event id.-Ppath β event path.-Ssource β source path for move or rename events. the "where did it come from" of it all π¦-ppid β process id of theafpdprocess that emitted the event.-uuser β AFP session user that emitted the event. hi bestie who did this ππ«Ά
π ENVIRONMENT π
NETATALK_FCE_LOG_FILEβ append event lines to this file instead of syslog. important: the file must be writable by the AFP session users that may trigger events. so like, permissions check first, queen πNETATALK_FCE_LOGGERβ logger command to use whenNETATALK_FCE_LOG_FILEis not set. default:logger.NETATALK_FCE_LOG_TAGβ syslog tag to use whenNETATALK_FCE_LOG_FILEis not set. default:netatalk-fce.
π EXECUTION CONTEXT π
this part is lowkey the most important part so pay attention bestie π
afpd executes the configured notification script as the AFP session user β not necessarily as root, and not necessarily as the user that started Netatalk. it's giving "identity crisis" but it's actually just how it works π
so: the configured script path must be executable by that user, and every parent directory in the path must be searchable by that user. every. single. one. no skipping levels π
and if file logging is enabled with NETATALK_FCE_LOG_FILE, that log file must also be writable by that user. no exceptions, no vibes-based permissions, fr fr π«Ά
β EXAMPLES β
π configure afpd to run the installed helper for each FCE event
[Global]
fce notify script = /usr/local/libexec/netatalk/fce_ev_script
fce version = 2
fce events = fmod,fdel,ddel,fcre,dcre,fmov,dmov,login,logout
a whole little event guest list and everyone's invited π₯
replace /usr/local/libexec with the libexec directory configured for your installation. iykyk β yours might not live there and that's fine π
π for diagnostic file logging, wrap the helper and set NETATALK_FCE_LOG_FILE
#!/bin/sh
NETATALK_FCE_LOG_FILE=/tmp/fce.log
export NETATALK_FCE_LOG_FILE
exec /usr/local/libexec/netatalk/fce_ev_script "$@"
the exec and the "$@" are doing the lord's work here β copy them exactly, bestie, don't get creative π§
π₯ SEE ALSO π₯
afpd(8), afp.conf(5), fce_listen(1) β go read your friends too, they're all iconic π
and that's the page!! she's fce_ev_script from the Netatalk 4.6.1 era, and this whole manual page said what it said π go forth and notify, bestie ππ¦β¨
π¦ where this page comes from
- nixpkgs unstable: netatalk 4.6.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms