Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Fedora Linux System Administration

You're reading from   Fedora Linux System Administration Install, manage, and secure your Fedora Linux environments

Arrow left icon
Product type Paperback
Published in Nov 2023
Publisher Packt
ISBN-13 9781804618400
Length 560 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Alex Callejas Alex Callejas
Author Profile Icon Alex Callejas
Alex Callejas
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Part 1:The Fedora Project
2. Chapter 1: Linux and Open Source Projects FREE CHAPTER 3. Part 2:Workstation Configuration
4. Chapter 2: Best Practices for Installation 5. Chapter 3: Tuning the Desktop Environment 6. Chapter 4: Optimizing Storage Usage 7. Chapter 5: Network and Connectivity 8. Part 3:Productivity Tools
9. Chapter 6: Sandbox Applications 10. Chapter 7: Text Editors 11. Chapter 8: LibreOffice Suite 12. Chapter 9: Mail Clients and Browsers 13. Part 4:System Administration Tools
14. Chapter 10: System Administration 15. Chapter 11: Performance Tuning Best Practices 16. Chapter 12: Untangling Security with SELinux 17. Chapter 13: Virtualization and Containers 18. Index 19. Other Books You May Enjoy

How to troubleshoot SELinux issues

The popular belief is that it is very difficult to determine and fix SELinux issues. This stems from the fact that the logs get logged with the system audit. This log reading is not intuitive and, in fact, to the human eye is quite complex; but it isn’t.

Carrying on with the example of the httpd web server, consider the following sequence of commands:

  1. As the root user, create the myfile file:
    # touch myfile
  2. Move the myfile file to the web content directory:
    # mv myfile /var/www/html/
  3. Use the curl command to get the contents of the myfile file published by the web server:
    # curl http://localhost/myfile
  4. Observe the output:
Figure 12.7 – Creating the myfile web file

Figure 12.7 – Creating the myfile web file

  1. Use the grep command to search for the myfile string in the system audit log:
    # grep myfile /var/log/audit/audit.log
    ...
    type=AVC msg=audit(1689045662.823:264): avc:  denied  { getattr } for  ...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image