How To Install fapolicyd on CentOS 8

fapolicyd is Application Whitelisting Daemon

Introduction

In this tutorial we learn how to install fapolicyd on CentOS 8.

What is fapolicyd

Fapolicyd (File Access Policy Daemon) implements application whitelisting to decide file access rights. Applications that are known via a reputation source are allowed access while unknown applications are not. The daemon makes use of the kernel’s fanotify interface to determine file access rights.

We can use yum or dnf to install fapolicyd on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install fapolicyd.

Install fapolicyd on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install fapolicyd using dnf by running the following command:

sudo dnf -y install fapolicyd

Install fapolicyd on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install fapolicyd using yum by running the following command:

sudo yum -y install fapolicyd

How To Uninstall fapolicyd on CentOS 8

To uninstall only the fapolicyd package we can use the following command:

sudo dnf remove fapolicyd

fapolicyd Package Contents on CentOS 8

/etc/fapolicyd
/etc/fapolicyd/fapolicyd.conf
/etc/fapolicyd/fapolicyd.rules
/etc/fapolicyd/fapolicyd.trust
/run/fapolicyd
/usr/lib/.build-id
/usr/lib/.build-id/73
/usr/lib/.build-id/73/0c5d0a3b9f2f265dc11118f6ba0eb0c17e91a8
/usr/lib/.build-id/f2
/usr/lib/.build-id/f2/0a22fd5597899763d902afb420e68406c2b9c1
/usr/lib/python3.6/site-packages/dnf-plugins/__pycache__/fapolicyd-dnf-plugin.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/dnf-plugins/__pycache__/fapolicyd-dnf-plugin.cpython-36.pyc
/usr/lib/python3.6/site-packages/dnf-plugins/fapolicyd-dnf-plugin.py
/usr/lib/systemd/system/fapolicyd.service
/usr/lib/tmpfiles.d/fapolicyd.conf
/usr/sbin/fapolicyd
/usr/sbin/fapolicyd-cli
/usr/share/doc/fapolicyd
/usr/share/doc/fapolicyd/README.md
/usr/share/fapolicyd
/usr/share/fapolicyd/fapolicyd-magic.mgc
/usr/share/fapolicyd/fapolicyd.rules.known-libs
/usr/share/fapolicyd/fapolicyd.rules.restrictive
/usr/share/licenses/fapolicyd
/usr/share/licenses/fapolicyd/COPYING
/usr/share/man/man1/fapolicyd-cli.1.gz
/usr/share/man/man5/fapolicyd.conf.5.gz
/usr/share/man/man5/fapolicyd.rules.5.gz
/usr/share/man/man5/fapolicyd.trust.5.gz
/usr/share/man/man8/fapolicyd.8.gz
/var/lib/fapolicyd
/var/lib/fapolicyd/data.mdb
/var/lib/fapolicyd/lock.mdb
/var/log/fapolicyd-access.log
/var/run/fapolicyd/fapolicyd.fifo

References

Summary

In this tutorial we learn how to install fapolicyd on CentOS 8 using yum and dnf.