From c3bec2e0005208cd36b7f42737c0543c48d301ee Mon Sep 17 00:00:00 2001 From: Ramil Valitov Date: Fri, 29 Nov 2019 14:57:53 +0300 Subject: [PATCH] [add] one more step how to grant previliges without root #7 --- README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 717dac9..b0cf219 100644 --- a/README.md +++ b/README.md @@ -198,7 +198,21 @@ Add the following line to this file: zabbix ALL = NOPASSWD: /etc/zabbix/zabbix_php_fpm_discovery.sh ``` -Here we specified `zabbix` as the user under which the Zabbix Agent is run. This is the default name, but if you have a custom installation with different name, then please, change it accordingly. Save and exit the editor. Your modifications will be applied. +Here we specified `zabbix` as the user under which the Zabbix Agent is run. This is the default name, but if you have a custom installation with different name, then please, change it accordingly. Save and exit the editor. Your modifications will be applied. + +Now edit the file `userparameter_php_fpm.conf`. Find the line: + +``` +UserParameter=php-fpm.discover,/etc/zabbix/zabbix_php_fpm_discovery.sh +``` + +Add `sudo` there, so the line should be: + +``` +UserParameter=php-fpm.discover,sudo /etc/zabbix/zabbix_php_fpm_discovery.sh +``` + +That's all. #### 1.4. Linux Tuning (optional) Usually PHP-FPM [backlog option](https://www.php.net/manual/en/install.fpm.configuration.php#listen-backlog) is limited by Linux kernel settings and equals to `128` by default.