12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

476CHAPTER 23Protecting Against Intruders with Security-Enhanced <strong>Linux</strong>FIGURE 23.5Adding Default Security ContextNOTEThe restorecon command can be used to manually relabel a filesystem using thedefault security contexts.To perform the same action on the command line, execute the following command as theroot user:semanage fcontext -a -t httpd_sys_content_t ‘/home/html(/.*)?’Either method creates the /etc/selinux//contexts/files/file_contexts.localfile if it doesn’t already exist and adds the following line to it:/home/html(/.*)?system_u:object_r:httpd_sys_content_t:s0If you require additional security contexts such as httpd_sys_script_exec_t for acgi_bin directory, add those as well.SummaryImplemented at the kernel level, SE<strong>Linux</strong> provides the ability to define a policy fromwhich the SE<strong>Linux</strong> mechanism allows or denies file access to specific users and processes.The default policy in <strong>Red</strong> <strong>Hat</strong> <strong>Enterprise</strong> <strong>Linux</strong>, the targeted policy, restricts access toparticular processes so that the security layer does not interfere with the day-to-day activitiesof most users. Basic options such as turning off protection for specific daemons andallowing certain service features that may be insecure can be enabled and disabledwithout writing a new policy.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!