Troubleshoot SELinux denials without disabling enforcement

8 steps · about 2 h 22 min · Intermediate

  1. Build the SELinux mental model (guide, Fedora documentation, 24 min)

    Understand subjects, objects, types and enforcement before interpreting a denial.

  2. Confirm the active mode (reference, Mankier, 12 min)

    Check enforcing and permissive state deliberately without making disablement the troubleshooting method.

  3. Start with the supported troubleshooting order (guide, Fedora documentation, 24 min)

    Check labeling, configuration and known policy intent before proposing a custom allow rule.

  4. Find the relevant audit events (reference, Mankier, 18 min)

    Filter AVC records by time, process and key so the diagnosis rests on the failed operation.

  5. Explain the denial (reference, Mankier, 14 min)

    Use explanation mode to translate an AVC while treating generated output as evidence to review, not an automatic allow rule.

  6. Restore expected file labels (reference, Linux man-pages, 16 min)

    Repair mislabeled paths from policy defaults and verify the change before modifying policy.

  7. Make a label mapping persistent (reference, Linux man-pages, 18 min)

    Define a durable file-context rule when application data lives outside its conventional path.

  8. Verify enforcement after the correction (guide, Fedora documentation, 16 min)

    Reproduce the operation in enforcing mode, confirm the expected access, and document any narrow exception.