StudyToCert

All certifications / RHCSA / Lessons

Red Hat Certified System Administrator EX200 (RHEL 10) · Domain 10: Manage security

Restoring default file contexts (restorecon -Rv) and adding rules with semanage fcontext

▶ Watch the overview video

Last reviewed September 25, 2026 · Leer en español

SELinux keeps a policy database of which label each path should have, written as regular expressions such as /var/www(/.*)? mapped to httpd_sys_content_t. The actual label is stored on each file. When the two disagree, the fix is to reset the file to what the policy says. When the policy itself has no rule for your custom path, you first add one.

Free account

Keep reading for free

Create a free StudyToCert account to read the rest of this lesson: 7 more sections, 4 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.

Sign up free Log in

Study RHCSA for free
A week-by-week plan with every lesson, quizzes, checkpoint tests, a practice exam and hands-on labs.
Open the RHCSA study plan