Use it to confirm whether SELinux causes a failure, then return to enforcing.
Permissive
Permissive mode loads the SELinux policy and logs AVC denials but does not block them. It is used briefly to diagnose, not for production.
1. setenforce 0 and reproduce.
2. Works now → ausearch -m AVC -ts recent lists what would be denied.
3. Fix labels, booleans or ports.
4. setenforce 1 and retest.
5. Confirm /etc/selinux/config says enforcing.
permissive → access allowed but denial logged → denials used to fix policy → back to enforcing
For SELinux → Permissive, continue with the first unproven Topic check: Record exact host, distribution/kernel, boot ID, time window, workload, identity and the authoritative configuration/policy source for Permissive. If that boundary is healthy, advance to the adjacent check: Read back the effective runtime state and precedence rather than assuming an edited file, package state or service status is active. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
runtime permissive mode → policy evaluation → would-deny AVCs → operation allowed → workload observation → label/policy remediation → return to enforcing
Healthy evidence: would-deny AVCs identify specific policy/label gaps, remediation is made persistently, enforcing is restored and the workload still succeeds
Step 2 Verification and output interpretation Verify boundary
Verification chain. runtime permissive mode → policy evaluation → would-deny AVCs → operation allowed → workload observation → label/policy remediation → return to enforcing
Step 3 Commands Verify boundary
setenforce 0
ausearch -m AVC -ts today
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: permissive becomes permanent, audit gaps hide denials, broad generated policy is accepted blindly or success in permissive is mistaken for safe production state
Step 5 Common mistakes Narrow the fault
- Leaving systems permissive permanently.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
setenforce 0 switches until reboot. If the problem disappears in permissive, collect the denials and fix them, then setenforce 1. Leaving systems permissive removes the protection.
getenforce / sestatus— mode and policyls -Z <path>— file contextps -eZ | grep <proc>— process contextausearch -m AVC -ts recent— recent denialssemanage fcontext -l | grep <path>— context rules for a path
ReferenceImportant terms & boundaries5 sections · depth on demand
What this shows and what it does not
Permissive testing is useful only when AVC evidence is captured and followed by minimal correction plus successful enforcing-mode verification.
In depth
Permissive mode: logging without blocking
Permissive mode loads the policy and logs every violation, but doesn't block anything. Red Hat's SELinux guide describes the tools:
setenforce 0switches a running system to permissive until the next reboot.getenforceshows the current mode.- A single domain can be made permissive while the rest stays enforcing (
semanage permissive -a <type>), which Red Hat advises using with caution. - Denials are logged as
type=AVCin the audit log, markedpermissive=1.
Uses of permissive mode
| Use | Scope |
|---|---|
| Find all denials an application would cause | One domain (semanage permissive -a) |
| Rescue a system that won't boot because of a policy problem | Kernel parameter enforcing=0 for one boot |
| Prepare a system that was disabled | Permissive first, relabel, then enforcing |
| Diagnose "is it SELinux?" | setenforce 0 for a short test, then back to 1 |
Global and per-domain permissive compared
setenforce 0 (global) | semanage permissive -a httpd_t (per domain) | |
|---|---|---|
| Protection for other services | None | Unchanged |
| Persistence | Until reboot | Persistent until removed |
| Typical risk | Forgotten after testing | Forgotten after development |
A safe workflow for a new application
| Step | Command |
|---|---|
| Make only the application's domain permissive | semanage permissive -a myapp_t |
| Exercise all its functions | — |
| Collect its denials | ausearch -m AVC -c myapp -ts today |
| Fix them with contexts, ports or booleans | semanage, setsebool -P |
| Return to enforcing for the domain | semanage permissive -d myapp_t |
host$ sudo setenforce 0 && getenforce
Permissive
host$ curl -s -o /dev/null -w "%{http_code}\n" http://localhost:8081/
200
host$ sudo ausearch -m AVC -ts recent | grep -o "permissive=1" | head -1
permissive=1
host$ sudo setenforce 1 && getenforce
Enforcing
host$ sudo semanage port -a -t http_port_t -p tcp 8081
host$ sudo semanage permissive -l
host$ grep -c "permissive=1" /var/log/audit/audit.log
Reading the test
The application works in permissive mode, and the log shows denials marked permissive=1. So SELinux is the cause of the failure in enforcing mode. Here it's a non-standard port, fixed by labelling the port. The system goes back to enforcing immediately, instead of staying permissive "for now".
Documented example, not captured output.
How it works at runtime
Permissive is part of SELinux → Permissive. SELinux Permissive mode evaluates policy and records denials that would have been enforced, but generally allows the operation, making it useful for controlled diagnosis rather than production enforcement.
Topic-specific state model. SELinux Permissive mode evaluates policy and records denials that would have been enforced, but generally allows the operation, making it useful for controlled diagnosis rather than production enforcement.
Interpretation rule. - Permissive mode ≠ SELinux disabled; policy evaluation and AVC generation can still occur.
- An application works in permissive mode ≠ the correct fix is to leave SELinux permissive.
Quick reference
Permissive mode logs what would have been denied but allows it — useful for diagnosing or for introducing a new application. You can make a single domain permissive while the rest stays enforcing:
setenforce 0 # whole system, until reboot
semanage permissive -a httpd_t # only httpd_t permissive
semanage permissive -l
semanage permissive -d httpd_t
Run the application through all features in permissive, collect AVCs, fix labels/booleans or build a small local module, then return to enforcing.
Limits and how it fails
Primary failure point. Permissive testing is useful only when AVC evidence is captured and followed by minimal correction plus successful enforcing-mode verification.
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Distribution/platform context. Permissive owns diagnostic non-blocking evaluation.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in SELinux → Permissive. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://selinuxproject.org/page/Main_Page · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Permissive operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for Permissive.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | SELinux Permissive mode evaluates policy and records denials that would have been enforced, but generally allows the operation, making it useful for controlled diagnosis rather than production enforcement. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin host + boot/time + real identity/workload → identify authoritative policy/key/trust source → read back loaded/effective runtime state → reproduce one safe allow/deny/handshake test → correlate audit/service/kernel evidence → locate first failed boundary → make the smallest persistent change → repeat original workload + regression/recovery check. | Use the shortest evidence path first; a fast check is a boundary test, not blanket proof. |
| Verification chain | runtime permissive mode → policy evaluation → would-deny AVCs → operation allowed → workload observation → label/policy remediation → return to enforcing | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | Permissive testing is useful only when AVC evidence is captured and followed by minimal correction plus successful enforcing-mode verification. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated Linux security/trust evidence can establish this proof path: runtime permissive mode → policy evaluation → would-deny AVCs → operation allowed → workload observation → label/policy remediation → return to enforcing | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It does not independently prove unobserved identities, objects, policies, namespaces, endpoints or time periods. Permissive testing is useful only when AVC evidence is captured and followed by minimal correction plus successful enforcing-mode verification. | Do not promote a local success signal into end-to-end or adjacent-dependency proof. |
| Next troubleshooting check | Continue from the first unproven security/trust boundary, capture the adjacent effective state and audit/handshake evidence, make only the demonstrated persistent change, then repeat the original workload plus recovery/regression checks. | Continue to the next unresolved boundary while preserving the original test condition. |
Permissive · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | Permissive |
|---|---|
| Topic path | SELinux → Permissive |
| Runtime state | SELinux Permissive mode evaluates policy and records denials that would have been enforced, but generally allows the operation, making it useful for controlled diagnosis rather than production enforcement. |
| Fast checks | - Record exact host, distribution/kernel, boot ID, time window, workload, identity and the authoritative configuration/policy source for Permissive. - Read back the effective runtime state and precedence rather than assuming an edited file, package state or service status is active. - Reproduce one safe allowed/denied or handshake/access test and correlate kernel/service/audit evidence at the first relevant boundary. - Apply the smallest persistent cause-specific change, then repeat the original test plus an adjacent regression/recovery check. |
| Verification chain | runtime permissive mode → policy evaluation → would-deny AVCs → operation allowed → workload observation → label/policy remediation → return to enforcing Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. |
| Failure boundary | Permissive testing is useful only when AVC evidence is captured and followed by minimal correction plus successful enforcing-mode verification. Boundary chain: process credentials/namespace → path/mount lookup → DAC/ACL/LSM → filesystem metadata → block/device/backend → completion/read-back. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |