thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Systems & Data Center · Advanced

restorecon

An SELinux command that resets file security contexts to the defaults defined in policy.

Definition

restorecon applies rules from the policy database, including any added with semanage fcontext. -R recurses and -v shows changes. Creating /.autorelabel triggers a full relabel at next boot.

Example

restorecon -Rv /var/www/html fixes labels on web content moved from a home directory.

Exam tip

chcon changes are temporary and are undone by restorecon; persistent fixes use semanage fcontext then restorecon.

Related terms