- 论坛徽章:
- 0
|
问题1:/usr/local/nginx/logs/nginx.pid
/dev/shm/php.socket 这两个文件在机器重启后,selinux type都自动变掉,需要restorecon还原后可以正常,为什么type在重启后会变掉
问题2:selinux 在enforcing 下,将网页根目录改到/home/www下某个文件,文件type为user_home_t,但是在浏览器页能正常访问
不是应该为httpd_sys_content_t才能正常访问吗- [root@localhost ~]# semanage fcontext -l|grep nginx
- /dev/shm/php.socket all files system_u:object_r:nginx_var_lib_t:s0
- /usr/local/nginx/client_body_temp(/.*)? all files system_u:object_r:nginx_var_lib_t:s0
- /usr/local/nginx/conf(/.*)? all files system_u:object_r:etc_t:s0
- /usr/local/nginx/fastcgi_temp(/.*)? all files system_u:object_r:nginx_var_lib_t:s0
- /usr/local/nginx/html(/.*)? all files user_u:object_r:httpd_sys_content_t:s0
- /usr/local/nginx/htmlbak(/.*)? all files system_u:object_r:httpd_sys_content_t:s0
- /usr/local/nginx/htmlbak/ all files system_u:object_r:httpd_sys_content_t:s0
- /usr/local/nginx/logs(/.*)? all files system_u:object_r:nginx_var_log_t:s0
- /usr/local/nginx/logs/nginx.pid all files system_u:object_r:nginx_var_run_t:s0
- /usr/local/nginx/proxy_temp(/.*)? all files system_u:object_r:nginx_var_lib_t:s0
- /usr/local/nginx/sbin/nginx regular file system_u:object_r:nginx_exec_t:s0
- /var/log/nginx(/.*)? all files system_u:object_r:nginx_var_log_t:s0
- dso_tool all files system_u:object_r:nginx_exec_t:s0
- sbin all files system_u:object_r:nginx_exec_t:s0
复制代码 |
|