Reader small image

You're reading from  Mastering Linux Security and Hardening - Third Edition

Product typeBook
Published inFeb 2023
Reading LevelIntermediate
PublisherPackt
ISBN-139781837630516
Edition3rd Edition
Languages
Tools
Right arrow
Author (1)
Donald A. Tevault
Donald A. Tevault
author image
Donald A. Tevault

Donald A. Tevault - but you can call him Donnie - got involved with Linux way back in 2006, and has been working with it ever since. He holds the Linux Professional Institute Level 3-Security certification, and the GIAC Incident Handler certification. Donnie is a professional Linux trainer, and thanks to the magic of the internet, teaches Linux classes literally the world over from the comfort of his living room. He's also a Linux security researcher for an IoT security company.
Read more about Donald A. Tevault

Right arrow

Troubleshooting with setroubleshoot

So, you’re now scratching your head and saying, When I can’t access something that I should be able to, how do I know that it’s an SELinux problem? Ah, I’m glad you asked.

Viewing setroubleshoot messages

Whenever something happens that violates an SELinux rule, it gets logged in the /var/log/audit/audit.log file. Tools are available that can let you directly read that log, but to diagnose SELinux problems it’s way better to use setroubleshoot. The beauty of setroubleshoot is that it takes cryptic, hard-to-interpret SELinux messages from the audit.log file and translates them into plain, natural language. The messages that it sends to the /var/log/messages file even contain suggestions about how to fix the problem. To show how this works, let’s go back to our problem where a file in the /var/www/html/ directory has been assigned the wrong SELinux type. Of course, we knew right away what the problem...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Mastering Linux Security and Hardening - Third Edition
Published in: Feb 2023Publisher: PacktISBN-13: 9781837630516

Author (1)

author image
Donald A. Tevault

Donald A. Tevault - but you can call him Donnie - got involved with Linux way back in 2006, and has been working with it ever since. He holds the Linux Professional Institute Level 3-Security certification, and the GIAC Incident Handler certification. Donnie is a professional Linux trainer, and thanks to the magic of the internet, teaches Linux classes literally the world over from the comfort of his living room. He's also a Linux security researcher for an IoT security company.
Read more about Donald A. Tevault