Reset file labels according to policy.
Section: SELinux and AppArmor Basics
Restore SELinux contexts
bash
bash
sudo restorecon -Rv /var/www/htmlExplanation
Very useful when copied files have wrong SELinux labels.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing SELinux and AppArmor Basics