[ZBX-20846] zabbix-agent2 doesn't include selinux context when installed from Zabbix repo Created: 2022 Apr 05 Updated: 2025 Mar 13 |
|
Status: | Confirmed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Packages (C) |
Affects Version/s: | 5.0.21 |
Fix Version/s: | None |
Type: | Problem report | Priority: | Trivial |
Reporter: | Skyler M | Assignee: | Zabbix Development Team |
Resolution: | Unresolved | Votes: | 5 |
Labels: | agent2 | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
CentOS 8 Stream |
Issue Links: |
|
||||||||
Sprint: | Support backlog |
Description |
Steps to reproduce:
Result: |
Comments |
Comment by Peter Roka [ 2022 May 05 ] |
Hi! Same issue on Rocky8. Zabbix Agent and Agent2 are installed from the official Zabbix RPM repo, respectively.
Zabbix Agent: ps -efZ | grep zabbix
Zabbix Agent 2: ps -efZ | grep -i zabbix
Agent2 is running unconfined, while the old Agent has it's own SElinux context "zabbix_agent_t". Having Agent2 running in it's own context instead of running unconfined is highly desired! |
Comment by Mikkel Kruse Johnsen [ 2023 May 30 ] |
Any news on this one ? This is where important on systems running in HIPAA mode |
Comment by Elina Kuzyutkina (Inactive) [ 2023 Jun 22 ] |
Now there separate packages with default selunux policies available. (they are the same for 5.0 version too) Regards, Elina |
Comment by Peter Roka [ 2023 Jun 27 ] |
"Now there separate packages with default selunux policies available. (they are the same for 5.0 version too)
Dear Elina! I have just installed an instance of zabbix-agent2 v5.0.35 using the package from the official RPM repository, but it still runs unconfined.
ps -efZ | grep zabbix
It is the same for zabbix-agent2 v6.0.18: ps -efZ | grep zabbix
Installing zabbix-selinux-policy package for v6.0.18 did not make any difference, as a policy will have little effect on any service that is not properly tagged! Please let me know if something more or else is needed to be done!
Best regards, Peter |
Comment by Pr2 [ 2023 Jul 05 ] |
Hello, This is how I fix this issue, based on this: I have installed the zabbix-agent2 6.0.19 packages on AlmaLinux. Assuming that your zabbix-agent2 is running with the zabbix user: sudo chown zabbix:root /run/zabbix/ sudo chmod 775 /run/zabbix/ And SELinux is running: sestatus SELinux status: enabled SELinuxfs mount: /sys/fs/selinux SELinux root directory: /etc/selinux Loaded policy name: targeted Current mode: enforcing Mode from config file: enforcing Policy MLS status: enabled Policy deny_unknown status: allowed Memory protection checking: actual (secure) Max kernel policy version: 33 My Zabbix agent2 is running properly. For your information I also need to open up AlmaLinux Firewall port: sudo firewall-cmd --zone=public --add-port 10050/tcp --permanent sudo firewall-cmd --zone=public --list-ports sudo firewall-cmd --reload |
Comment by Andrey Tocko (Inactive) [ 2024 Apr 12 ] |
Made an extension to default zabbix_agent_t domain of SE linux to include agent2 in to the same domain. |