[root@groad.net ~]# sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: enforcing
Mode from config file: enforcing
Policy version: 24
Policy from config file: targeted
[root@groad.net ~]# echo "hello groad.net" > /var/www/html/index.html
[root@groad.net ~]# ls -Z /var/www/html/index.html
-rw-r--r--. root root unconfined_u:object_r:httpd_sys_content_t:s0 /var/www/html/index.html
# service httpd start
[root@groad.net ~]# chcon -t samba_share_t /var/www/html/index.html
[root@groad.net ~]# ls -Z /var/www/html/index.html
-rw-r--r--. root root unconfined_u:object_r:samba_share_t:s0 /var/www/html/index.html
Jun 20 23:34:02 groad kernel: type=1400 audit(1371742442.556:79398): avc: denied { getattr } for pid=21702 comm="httpd" path="/var/www/html/index.html" dev=dm-0 i
no=6162577 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:samba_share_t:s0 tclass=file
Jun 20 23:34:02 groad kernel: type=1400 audit(1371742442.557:79399): avc: denied { getattr } for pid=21702 comm="httpd" path="/var/www/html/index.html" dev=dm-0 i
no=6162577 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:samba_share_t:s0 tclass=file
[Thu Jun 20 23:34:02 2013] [error] [client 192.168.1.110] (13)Permission denied: access to /index.html denied
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) | Powered by Discuz! X3.2 |