restorecon

Restore SELinux file contexts

medium risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
Safer / dry-run alternatives
restorecon -Rnv <path>Dry run
What it does

Resets file contexts to policy defaults.

Common flags
FlagMeaning
-RRecurse
-vVerbose
-nDry run
Examples
restorecon -Rnv /var/wwwDry run · explain & risk-check →
restorecon -Rv /var/wwwApply · explain & risk-check →
Related
selinux semanage
Open the full explainer →More in Users, Permissions & Security

Reference text is hand-written and may be incomplete — check man restorecon for your version. Test destructive commands on a non-production system first.