10.2. Deploying fapolicyd


When deploying the fapolicyd application allowlisting framework, you can either try your configuration in permissive mode first or directly enable the service in the default configuration.

Procedure

  1. Install the fapolicyd package:

    # dnf install fapolicyd
  2. Set the Audit subsystem for recording fapolicyd events:

    # auditctl -w /etc/fapolicyd/ -p wa -k fapolicyd_changes
    # service try-restart auditd
  3. Optional: To try your configuration first, change mode to permissive.

    1. Open the /etc/fapolicyd/fapolicyd.conf file in a text editor of your choice, for example:

      # vi /etc/fapolicyd/fapolicyd.conf
    2. Change the value of the permissive option from 0 to 1, save the file, and exit the editor:

      permissive = 1

      Alternatively, you can debug your configuration by using the fapolicyd --debug-deny --permissive command before you start the service. See the Troubleshooting problems related to fapolicyd section for more information.

  4. Enable and start the fapolicyd service:

    # systemctl enable --now fapolicyd
  5. If you enabled permissive mode through /etc/fapolicyd/fapolicyd.conf:

    1. Use your applications.
    2. Check Audit logs for fanotify denials, for example:

      # ausearch -ts recent -m fanotify
    3. When debugged, disable permissive mode by changing the corresponding value back to permissive = 0, and restart the service:

      # systemctl restart fapolicyd

Verification

  1. Verify that the fapolicyd service is running correctly:

    # systemctl status fapolicyd
    ● fapolicyd.service - File Access Policy Daemon
         Loaded: loaded (/usr/lib/systemd/system/fapolicyd.service; enabled; preset: disabled)
         Active: active (running) since Tue 2024-10-08 05:53:50 EDT; 11s ago
    …
    Oct 08 05:53:51 machine1.example.com fapolicyd[4974]: Loading trust data from rpmdb backend
    Oct 08 05:53:51 machine1.example.com fapolicyd[4974]: Loading trust data from file backend
    Oct 08 05:53:51 machine1.example.com fapolicyd[4974]: Starting to listen for events
  2. Log in as a user without root privileges, and check that fapolicyd is working, for example:

    $ cp /bin/ls /tmp
    $ /tmp/ls
    bash: /tmp/ls: Operation not permitted
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동