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.

474CHAPTER 23Protecting Against Intruders with Security-Enhanced <strong>Linux</strong>FIGURE 23.4Error AnalysisSince the -v option was used, if the command is successful, the following types ofmessages are displayed:context of /home/html changed to system_u:object_r:httpd_sys_content_tcontext of /home/html/index.html changed to system_u:object_r:httpd_sys_content_tAs you might have noticed from Listing 23.2, the cgi-bin directory needs to have adifferent security context type since files in it can be executed. If you have a cgi-bindirectory, use the following to change its security context:chcon -R —type=httpd_sys_script_exec_t /home/html/cgi-binBecause the user and role of the security context was already changed when you recursivelychanged the security context for the entire new DocumentRoot, this commandonly modifies the type.TIPA complete list of security contexts for the Apache HTTP server can be found in thehttpd_selinux man page. View it with the man httpd_selinux command.After fixing the security context of the web page files, test your changes by opening a webbrowser and trying to view the pages. Restarting httpd is not necessary after changing thesecurity context of the files because SE<strong>Linux</strong> checks the security context each time arequest is made.

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

Saved successfully!

Ooh no, something went wrong!