Selinux: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Internal=
=Internal=


* [[Linux 7 Security]]
* [[Linux Security]]


=Overview=
=Overview=


=How to Find Out Whether SELinux is Enabled=
SELinux stands for Security-Enhanced Linux. It provides Mandatory Access Control (MAC) for Linux systems. Under the control of SELinux, all processes and files are given a ''type'', and their access on the system is limited by fine-grained controls of various types.


<pre>
=Subjects=
getenforce
</pre>


If SELinux is enabled, the command will return "Enforcing".
* [[SELinux Concepts|Concepts]]
* [[SELinux Operations|Operations]]


=Configuration=
=Configuration=
Line 29: Line 28:
=Troubleshooting=
=Troubleshooting=


==Diagnosing and Fixing SELinux Problems==
Also see: {{Internal|SELinux_Operations#Troubleshooting.2C_Diagnosing_and_Fixing_SELinux_Problems|Troubleshooting, Diagnosing and Fixing SELinux Problems}}
 
If you have a suspicion that SELinux may be at the root of your problems, run:
 
<pre>
sealert -a /var/log/audit/audit.log
</pre>
 
You may get an output similar to the following one, which helps diagnose the problem:
 
<pre>
[...]
SELinux is preventing /usr/sbin/httpd from write access on the file manager.node.nodes.lock.
[...]
</pre>
 
The tools also suggest what to do to fix it.


==Permission Denied when Trying to Write in a Directory==
==Permission Denied when Trying to Write in a Directory==


<font color=red>TODO, rationalize the following content: [[Media_Wiki_Installation#Fails_to_upload_images_with_.27Fatal_exception_of_type_.22MWException.22.27]].</font>
<font color=darkkhaki>TODO, rationalize the following content: [[Media_Wiki_Troubleshooting#Fails_to_upload_images_with_.27Fatal_exception_of_type_.22MWException.22.27]].</font>

Latest revision as of 20:00, 30 December 2023

Internal

Overview

SELinux stands for Security-Enhanced Linux. It provides Mandatory Access Control (MAC) for Linux systems. Under the control of SELinux, all processes and files are given a type, and their access on the system is limited by fine-grained controls of various types.

Subjects

Configuration

Install Management and Troubleshooting Tools

yum provides /usr/sbin/semanage
yum provides sealert
yum -y install policycoreutils-python
yum -y install setroubleshoot-server

Troubleshooting

Also see:

Troubleshooting, Diagnosing and Fixing SELinux Problems

Permission Denied when Trying to Write in a Directory

TODO, rationalize the following content: Media_Wiki_Troubleshooting#Fails_to_upload_images_with_.27Fatal_exception_of_type_.22MWException.22.27.