I have a Centos 6 Linux box. I read tutorials on SELinux and wanted to try it out. Here are steps I followed,
- set
SELINUX=enforcing
in/etc/selinux/config
- turned on SELINUX with
setenforce 1
service httpd restart
changed type on a php script file.
from httpd_sys_content_t to something else eg: init_t (maybe this is not suitable type to test with?)
chcon -t init_t /var/www/html/index.php
I hoped to get an error when I browsed to this file with web browser, but alas I was still able to see contents.