Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 592954 - net-analyzer/zabbix-3.0.3-r1 and above creating etc files owned by user of webserver
Summary: net-analyzer/zabbix-3.0.3-r1 and above creating etc files owned by user of we...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Deadline: 2019-11-27
Assignee: Patrick Lauer
URL:
Whiteboard:
Keywords: PMASKED
: 606160 (view as bug list)
Depends on: 528694
Blocks:
  Show dependency tree
 
Reported: 2016-09-05 17:48 UTC by zasire
Modified: 2019-12-13 15:52 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
fixed zabbix-3.0.4.ebuild (zabbix-3.0.4.ebuild,9.96 KB, text/plain)
2016-09-05 21:34 UTC, zasire
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zasire 2016-09-05 17:48:34 UTC
When installing Zabbix stable (currently 2.2.5), files in /etc/zabbix will be owned by Zabbix user. I've tried to install latest unstable version (currently 3.0.4) and files will be owned by current web user. This happens only if "frontend" USE Flag is set.

This will break Zabbix as it won't start due to "permission denied" when starting up.

Reproducible: Always

Steps to Reproduce:
1. emerge =net-analyzer/zabbix-3.0.4
2. ls -la /etc/zabbix
3. -rw-r-----  1 nginx nginx 14822 Sep  5 19:36 zabbix_server.conf
Actual Results:  
Zabbix will fail to start, since permission denied to /etc/zabbix/*.conf

Expected Results:  
Files in /etc/zabbix should be zabbix:zabbix and Zabbix should start
Comment 1 zasire 2016-09-05 17:50:33 UTC
Same result happens in net-analyzer/zabbix-3.0.3-r1 with "frontend" enabled
Comment 2 zasire 2016-09-05 18:11:46 UTC
Maybe i was to fast filling that bug. I've just found out that ALL files for Zabbix are owned by nginx:nginx in 3.0.3-r1 and above. That includes service files, init files or anything else.
Comment 3 zasire 2016-09-05 21:34:28 UTC
Created attachment 445052 [details]
fixed zabbix-3.0.4.ebuild

I've digged into this a bit more and at least a solution. This Bug seems to have existed before and the old ebuilds had "fix". I don't know what causes this problem but the old EAPI 5 ebuilds up to 2.4.7 had a couple of lines to fix the permissions. These lines are missing in the new EAPI 6 ebuilds from 2.4.8 to current. But even those were not enough as systemd service files will still have wrong permissions.

I've added a fix to the ebuild as similar to the one on current stable. Additionally i've checked for the fix to be run only on "frontend" USE flag and added systemd file too. That would fix the tmpfiles.d bug we have currently in stable as tmp files will not be created for systemd.
Comment 4 Robert Förster 2016-09-13 11:18:53 UTC
that's a fallout from bug 528694 ... maybe.
its interesting that i didn't see any of this in my installation(s) or upgrades
Comment 5 Pacho Ramos gentoo-dev 2019-12-13 15:50:58 UTC
bug 528694 got fixed in newer versions
Comment 6 Pacho Ramos gentoo-dev 2019-12-13 15:52:13 UTC
*** Bug 606160 has been marked as a duplicate of this bug. ***