SELinux avc: denied Explainer & audit2allow Policy Generator
Paste raw RHEL, Rocky Linux, CentOS, or Fedora /var/log/audit/audit.log denials to get plain-English audit2why explanations, recommended setsebool / restorecon fixes (instead of turning off SELinux!), and a clean .te Type Enforcement policy module 100% locally in your browser.
grep "avc: denied" /var/log/audit/audit.log)0 denialsaudit2why)audit2allow -m)
Compile: checkmodule -M -m -o local_fix.mod local_fix.te && semodule_package -o local_fix.pp -m local_fix.mod && sudo semodule -i local_fix.pp
Stop Running setenforce 0: Decode SELinux avc: denied Logs in Seconds
When Nginx returns 502 Bad Gateway or a container fails with Permission denied on RHEL, Rocky Linux, AlmaLinux, or Fedora even though Unix file permissions look fine, SELinux is usually blocking the syscall in /var/log/audit/audit.log. Admins often hesitate to paste internal audit logs into cloud websites because they expose internal host paths, PIDs, and port numbers.
This client-side analyzer decodes every AVC denial locally in your browser, prioritizes safe built-in remedies (setsebool -P, semanage port, and semanage fcontext + restorecon), and emits a minimal, deduplicated .te Type Enforcement policy when a custom rule is genuinely required.
Browser AVC Analyzer vs. audit2why & audit2allow CLI
| Criteria | QuickCoderHub (In-Browser) | policycoreutils-python-utils CLI |
|---|---|---|
| Zero Package Install | Works immediately on any OS without installing setroubleshoot | Often missing on minimal production RHEL/Rocky servers |
| Readable Explanations | Translates scontext, tcontext, tclass, and flags enforcing vs. permissive | Terse terminal output |
| Safe Boolean & Label Hints | Highlights setsebool -P & restorecon before resorting to custom .te | audit2allow blindly writes broad allow rules if misused |
| Log Privacy | 100% browser-local; audit logs never leave your laptop | Local host only |
Frequently Asked Questions
Why does Nginx get avc: denied { name_connect } when proxying to localhost:8080?
By default SELinux blocks httpd_t from initiating outbound TCP connections. Fix it cleanly with a single boolean: sudo setsebool -P httpd_can_network_connect 1.
Why is my web server blocked from reading files I copied from /home?
Moving (mv) files from a home directory preserves their user_home_t label instead of inheriting httpd_sys_content_t. Run sudo restorecon -Rv /var/www/html to restore proper labels without writing custom policy modules.
What does permissive=1 vs permissive=0 mean in an AVC line?
permissive=0 means SELinux was enforcing and actively blocked the action. permissive=1 means the domain or host was in permissive mode, so the action was logged as a warning but allowed to proceed.
Is my server's audit.log uploaded anywhere?
Never. All parsing and .te policy generation happen strictly inside local browser JavaScript memory.