selinux

Apache run external program with SELinux enabled

This is helpful when you don't want to disable Selinux and need to run external program like wkhtmltopdf via apache on selinux enabled. Run the following commands from the terminal. (This has been tested in CentOS 7)

Allow Execution

setsebool httpd_execmem on

Change a dirs security context if the program writes to a file

chcon -R -t httpd_sys_rw_content_t dir
Tags 
apache selinux


QR Code for https://setupexample.com/tags/selinux