How to autorelabel SELinux for an entire file system
Issue
- An autorelabel for SELinux fails:
/.autorelabel
is detected correctly butfixfiles
fails silently. - How to relabel a file system that has a large amount of SELinux errors
Environment
- Red Hat Enterprise Linux 5
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- SELinux is disabled
/etc/selinux/config
is updated to setSELINUX=enforcing
on the next boot/.autorelabel
exists to force a relabel on the next boot
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.