Tuesday, September 16, 2014

cannot enable executable stack as shared object requires: Permission denied

Story:

Today, One of our team member has been installed a clean installation of RHEL 6.3 (RedHat) and once we try to start the Apache web server, it went bad due to following error.

Error:


Starting httpd: httpd: Syntax error on line 218 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/libphp5.so into server: /etc/httpd/modules/libphp5.so: cannot enable executable stack as shared object requires: Permission denied 

Solution:


  1. Log into the CLI - Command Line interface (As root user)
  2. Run Following Command
[root@new ~]# execstack -c /etc/httpd/modules/libphp5.so

Image: