SELinux阻止httpd(usr/sbin/httpd)写入访问/ var/www/html/bookings/templates_c

Ass*_*Guy 2 linux apache fedora selinux smarty

我正在使用一个使用Smarty模板引擎的框架.它在Windows中运行良好,但当我尝试在LAMP服务器中运行它时,我得到了一条消息SELinux has detected suspicious behaviour on your system.我附上的整个错误信息.请指导我做什么.谢谢图片

fav*_*tti 8

您可以使用它来允许它 setsebool -P httpd_unified=1

http的正常SELinux设置可以或多或少地适用于PHP:

setsebool -P httpd_enable_cgi on
setsebool -P httpd_unified on
setsebool -P httpd_builtin_scripting on
Run Code Online (Sandbox Code Playgroud)

否则你可以使用

getsebool -a | grep httpd
Run Code Online (Sandbox Code Playgroud)

获取与httpd相关的EeLinux选项列表,并根据您的个人喜好进行调整.