Troubleshooting SELinux
SELinux is generally stable and free of trouble. But sometimes, particularly during the initial period when a system administrator is unfamiliar with SELinux, problems crop up. The following five subsections provide troubleshooting tips that address the most common problems encountered. These problems are classified into the following five categories:
Boot problems
Local login problems
Program execution problems
Daemon problems
X problems
Boot Problems
It’s
relatively common to
misconfigure or otherwise break an SELinux system in a way that
prevents it from booting. If you find that you’ve
done so, try to boot into permissive mode
(enforcing=0) or with SELinux disabled
(selinux=0). If your kernel does not support these
options, boot the system using a non-SELinux kernel, such as one
residing on rescue media. Generally, you can then troubleshoot and
repair the problem.
Tip
If you boot with SELinux disabled or by using a non-SELinux kernel, the system will likely create unlabeled files or disturb existing file labels during your session. To repair the damage, you should reboot into permissive mode, relabel the filesystems, reboot, and relabel the filesystems once again.
Local Login Problems
Another relatively common problem is inability to log into the system. A likely cause is that the user’s home directory is not labeled or is labeled with an incorrect security context. You can fix this problem by using the fixfiles utility:
fixfiles restore
Alternatively, if you’re ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access