Restrict access to the frontend config #1489
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
Restrict access to the web frontend config file
/etc/zabbix/web/zabbix.conf.php
.The file contains passwords, so should not be publicly readable. Also fix the owner for the case that the fpm user differs from the www user.
ISSUE TYPE
COMPONENT NAME
zabbix_web
ADDITIONAL INFORMATION
Currently, the config file gets these permissions:
This is undesired, as the file contains the database password. Also, the owner/group are wrong in the case that the
zabbix_php_fpm_conf_user
differs fromzabbix_web_user
.This patch restricts the (default) permissions to 0640, changes the owner to
zabbix_web_user
(orzabbix_php_fpm_conf_user
if it is defined) and the group tozabbix_web_group
(orzabbix_php_fpm_conf_group
if it is defined).