Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save calebbrewer/e2f29dfe571aa8d1161a to your computer and use it in GitHub Desktop.
Save calebbrewer/e2f29dfe571aa8d1161a to your computer and use it in GitHub Desktop.
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
Copy link

Endogen commented Jan 1, 2016

setsebool httpd_execmem on that was extremely helpful!! thanks

@calebbrewer
Copy link
Author

No problem. Glad it helped!

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