After testing he whole recommendations in this thread without any luck (sum may work, but none is permanent, I am on Centos 5.8), I came across this solution, by reading: wiki . centos . org/HowTos/SELinux
- Code: Select all
Stopping httpd: [FAILED]
Starting httpd: httpd: Syntax error on line 210 of /etc/httpd/conf/httpd.conf: Syntax error on line 6 of /etc/httpd/conf.d/zendserver_php.conf: Cannot load /usr/local/zend/lib/apache2/libphp5. so into server: /usr/local/zend/lib/apache2/libphp5. so: cannot enable executable stack as shared object requires: Permission denied
[FAILED]
do not change selinux enforcing, with enforcing enabled, first find out what rules should be set:
- Code: Select all
grep httpd_t /var/log/audit/audit.log | audit2allow
if this seems OK to you, make a module for selinux:
- Code: Select all
grep httpd_t /var/log/audit/audit.log | audit2allow -M myhttpdrule
then enable it:
- Code: Select all
semodule -i myhttpdrule.pp
restart httpd:
- Code: Select all
service httpd restart
and if any errors, or not run the above commands again to make sure no other rules should be in place...
for me the command produces these rules:
- Code: Select all
#============= httpd_t ==============
allow httpd_t amanda_port_t:tcp_socket name_bind;
allow httpd_t file_t:dir { search getattr setattr };
allow httpd_t file_t:file getattr;
allow httpd_t self:capability ipc_owner;
allow httpd_t self:process { execstack execmem };
allow httpd_t usr_t:file { write append };
I am not sure if these rules are correct, if they are too open, and may reduce the server security or not, so if any one could tell me about them, that would be great.
Thanks everyone for your post.