80/tcp
Based on C/S model
Loading httpd
/var/www/html
/ETC/HTTPD/CONF/HTTPD.CONF Master configuration file
SELinux
An access model developed by the U.S. Security Service
Enable
Disabled
Enforing: Mandatory mode if our actions violate selinux, force a refusal
Permissive: If you violate SELinux, you will only be warned that you can still access
Files can be set up with permissions called DAC active access control
SELinux mac for files or directories, mandatory access control
Two important elements related to SELinux
1. Security context
2.bool value
|| -Z//View the document's content values
First way: chcon-rt default _t index.html//Modify file Bag content value
The second way
If you forget the content value of the file itself, you can refer to someone else's
Chcon--referenc=var/www/html index.html
Conclusion: The security context is the control of the security-related
Boole value
function is not turned on
o Close
1 Open
GETSEBOOL-A//View all BOOL values
getsebool-a | grep httpd//filter HTTPD related bool finger
If you want to enable the profile feature, you need to open the corresponding bool value
Setsebool-p httpd enable Homedirs on
Summary: When it comes to functionality, it is a bool value.
The security context is when the file is accessed
This article from "Big Plum" blog, declined reprint!
Linux System Administration http