FAPOLICYD(8)
π FAPOLICYD π
okay bestie, welcome to the fapolicyd page β that's the File Access Policy Daemon, section 8 of the System Administration Utilities manual, and yes she is that girl. π
β¨ NAME β¨
fapolicyd β the File Access Policy Daemon. that's it, that's the name, she's literally the whole vibe π
πΈ SYNOPSIS πΈ
fapolicyd [--debug|--debug-deny|--foreground] [--permissive] [--no-details] [--mounts=PATH] [--version]
π¦ DESCRIPTION π¦
so like. fapolicyd is a userspace daemon that decides who gets access to which files, based on a trust database plus the attributes of the file or the process asking. and she can run it two ways, bestie: blacklist file access and execution, or whitelist it. pick your fighter. β¨
configuring her? that's all happening in the files inside /etc/fapolicyd/. there are three of them and they each do their own little job:
compiled.rulesβ this one holds the access policy πfapolicyd.confβ this one decides the daemon's configuration βοΈfapolicyd.trustβ this one lets the admin define trusted files by hand π«Ά
the default rules will generate audit events whenever there's a denial. NOTE: you must have at least 1 audit rule loaded for the audit system to create the full FANOTIFY event. doesn't matter which rule is loaded, literally any of them. and to see if you've got any denials, run this:
ausearch --start today -m fanotify -i
or instead of -i, you can add --format text to get an easier to read audit event. iconic. π
π OPTIONS π
--debugβ run the daemon in the foreground and write event information tostderrso you can actually see the policy decisions happening. it's giving voyeur but make it sysadmin π₯--debug-denyβ same foreground situation, but she only writes deny decisions tostderr. no noise, just the drama π--foregroundβ run in the foreground without enabling debug output. this one's for service managers using readiness or watchdog supervision, so like, babysitters basically πΌ--permissiveβ allow file access even when the policy would deny it. super useful when you're validating rules before you actually enforce them. test run era, no cap π§--mounts=PATHβ in debug mode only, read mount information from the regular file atPATHinstead of/proc/mounts. the file has to use the same format as/proc/mounts. great for reproducing mount-related issues with a captured or filtered mount list ποΈ--no-detailsβ suppress process and file names in the shutdown usage report while keeping the aggregate statistics. names redacted, receipts kept π--versionβ display version information and exit. short, sweet, slay β
π SIGNALS π
SIGTERMβ causesfapolicydto discontinue processing events, write it's performance report, and exit. she's logging off, respectfully πSIGHUPβ causesfapolicydto reload the trust database. refresh, refresh, refresh π¦SIGUSR1β causesfapolicydto dump the requested report to/run/fapolicyd/fapolicyd.stateor/run/fapolicyd/fapolicyd.metrics. seefapolicyd.state(5)andfapolicyd.metrics(5). π- when
reset_strategy=manualis configured, aSIGUSR1report that carries reset intent (only possible programmatically) also resets runtime metric counters after the report is written. plainSIGUSR1reports do not reset counters. β οΈ SIGUSR1can also carry timing start and stop intents. those intents are honored only for privileged senders whentiming_collection=manualis active; stopped timing runs are written to/run/fapolicyd/fapolicyd.timing. β±οΈ
- when
π NOTES π
okay bestie this first one is a whole BIG DEAL so pay attention:
whatever you do, DO NOT TRY TO ATTACH WITH PTRACE. ptrace attachment sends aSIGSTOPwhich cannot be blocked. since your whole system depends onfapolicydapproving access to glibc and various critical libraries, that approval will not happen untilSIGCONTis sent. the system can deadlock if the continue signal is not sent. fr fr, do not do this. π
to get audit events, you must have auditing enabled and at least one systemcall rule loaded. otherwise you will not get any events. periodt. π
if the rpmdb is set as a trust source, you should minimize the number of 32 bit packages on the system. in such cases, there may be a 32 bit and 64 file with the same pathname. obviously only one can exist on the disk. so, this will always cause database miscompares and cause a delay in the daemon being operational. π
the compiled.rules file is the resulting merge of component rules in /etc/fapolicyd/rules.d/. see the fagenrules man page for more information. π§
when built with systemd watchdog support, the packaged service uses Type=notify and starts fapolicyd with --foreground. see systemd-watchdog.md in the documentation directory for watchdog timeout and drop-in examples. π₯
and if you're running in debug mode and you wish to compare rule numbers reported in the output with which rule is actually triggering, you can see the rules with the corresponding number by running:
fapolicyd-cli --list
β¨ iykyk β¨
π FILES π
/etc/fapolicyd/fapolicyd.confβ daemon configuration βοΈ/etc/fapolicyd/compiled.rulesβ access control rules π/etc/fapolicyd/fapolicyd.trustβ admin defined trusted files π«Ά/var/log/fapolicyd-access.logβ information about what was being accessed. π/run/fapolicyd/fapolicyd.stateβ daemon state report. seefapolicyd.state(5). π/run/fapolicyd/fapolicyd.metricsβ runtime metrics report. seefapolicyd.metrics(5). π/run/fapolicyd/fapolicyd.timingβ manual decision timing report. seefapolicyd.timing(5). β±οΈ
π SEE ALSO π
fapolicyd-cli(8), fapolicyd.rules(5), fapolicyd.state(5), fapolicyd.metrics(5), fapolicyd.timing(5), fapolicyd.trust(5), fapolicyd-filter.conf(5), fagenrules(8), and fapolicyd.conf(5)
go read the whole friend group, they're all bangers π
π AUTHOR π
Steve Grubb β thank you for your service king π
okay that's the whole page bestie!! this one's from Red Hat, dated March 2026, and it lives at FAPOLICYD(8). now go enforce some policy, you absolute icon π
β¨π
π¦ where this page comes from
- centos-stream 10: fapolicyd 2.0.1-1.el10 Β· GPL-3.0-or-later
- centos-stream 9: fapolicyd 2.0.1-1.el9 Β· GPL-3.0-or-later
- fedora 43: fapolicyd 2.0-1.fc43 Β· GPL-3.0-or-later
- fedora 44: fapolicyd 2.0.1-1.fc44 Β· GPL-3.0-or-later
- ubuntu stonking: fapolicyd 2.0-1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms