Skip to content

Instantly share code, notes, and snippets.

@carlbennett
Last active May 8, 2016 08:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlbennett/6b24f6b5e18029c46d54 to your computer and use it in GitHub Desktop.
Save carlbennett/6b24f6b5e18029c46d54 to your computer and use it in GitHub Desktop.
New Relic PHP Agent SELinux Policy
module newrelic.te 1.0.0;
require {
type httpd_t;
type user_home_t;
type var_log_t;
class file { open write read };
}
#============= httpd_t ==============
allow httpd_t user_home_t:file write;
allow httpd_t var_log_t:file open;
@carlbennett
Copy link
Author

https://discuss.newrelic.com/t/php-agent-cant-connect-to-tmp-newrelic-sock/1218/3

checkmodule -M -m -o ~/php.mod ~/php.te
semodule_package -m ~/php.mod -o ~/php.pp
sudo semodule -i ~/php.pp

^ relevant for how to build and install this SELinux module

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