linux-selinux-helper

Diagnose and fix SELinux denials with file contexts, booleans, and policy modules.

3|1|Updated Feb 24, 2026
One-click install
npx skills add https://github.com/chfle/lehnert-claude-skills --skill linux-selinux-helper
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: linux-selinux-helper
Source: https://github.com/chfle/lehnert-claude-skills/tree/main/skills/linux-selinux-helper
Command: npx skills add https://github.com/chfle/lehnert-claude-skills --skill linux-selinux-helper

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Diagnoses SELinux denials and guides you toward the minimal correct fix, from file context relabels to custom policy modules, without suggesting disabling SELinux.

Core Features & Use Cases

  • Automated diagnostic workflow for AVC denials, permission errors, and policy gaps on RHEL-family systems.
  • Step-by-step fixes including file context relabeling, boolean toggles, port labeling, and policy module creation.
  • Real-world scenarios with commands to reproduce, diagnose, and verify fixes, plus safe remediation guidance.

Quick Start

Describe the AVC denial or problem to begin automated SELinux diagnostics.

Frequently Asked Questions about linux-selinux-helper

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I diagnose and fix SELinux AVC denials on RHEL?

Diagnose SELinux AVC denials on RHEL by analyzing audit logs, then apply minimal fixes using file context relabeling, boolean toggles, port labeling, or custom policy modules without disabling SELinux.

What is the best way to resolve SELinux policy blocks for applications?

Resolving SELinux policy blocks involves structured diagnostic workflows that identify the exact permission gap and implement targeted remediation using semanage and custom policy modules for safe fixes.

How does audit2why help troubleshoot SELinux permission errors?

Audit2why troubleshoots SELinux permission errors by translating AVC denial messages into readable explanations, indicating whether a boolean toggle or custom policy module is required for remediation.

Can I use semanage to fix SELinux file context and port labeling issues?

Yes, semanage fixes SELinux file context and port labeling issues by applying minimal correct labels, followed by restorecon to ensure applications retain access without disabling policy.

When do I need to create a custom SELinux policy module instead of toggling booleans?

Create a custom SELinux policy module when existing booleans and file context changes cannot resolve the AVC denial, requiring custom policy development to grant specific application permissions safely.

SELinux denial troubleshooting not working, what are the limitations of minimal fixes?

When SELinux denial troubleshooting is not working with minimal fixes, limitations include complex application requirements needing custom policy modules, or systemic policy gaps that cannot be resolved by booleans alone.