restorecon
SafeRestore SELinux labels
restorecon -Rv <path>
Resets file contexts to policy defaults — the proper fix when mv'd files break the web server.
Examples
restorecon -Rv /var/www/htmlFix labels under the web root
Syntax
restorecon [-R] [-v] <path>
Before you run it
Relabeling only.
Related commands
- getenforce / sestatusSELinux status
- lsList directory
The same reference, with no signal at all
Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.
Get it free on the App Store