Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Allow apache to execute an external program through SELinux.

Allow apache to execute an external program through SELinux

This is helpful when you don't want to disable SELinux but do want to allow apache to execute an external program. For example wkhtmltopdf. Run the following commands from the terminal. (This has been tested in CentOS 7.)

Allow Exicution

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

@Endogen

This comment has been minimized.

Copy link

@Endogen Endogen commented Jan 1, 2016

setsebool httpd_execmem on that was extremely helpful!! thanks

@calebbrewer

This comment has been minimized.

Copy link
Owner Author

@calebbrewer calebbrewer commented Apr 4, 2016

No problem. Glad it helped!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment