ci: run poller as www-data to avoid RRD ownership errors - #367
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The workflow changes address the CI ownership errors without unresolved issues.
Review effort: Lite
Findings: None
What changed in this PR
Updates CI polling to run as www-data, avoiding root-only RRD ownership errors.
Changes:
- Re-applies ownership and permissions before polling.
- Runs
poller.phpaswww-data.
| File | Description |
|---|---|
.github/workflows/plugin-ci-workflow.yml |
Adjusts permissions and poller execution user. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
xmacan
approved these changes
Sep 19, 2026
xmacan
approved these changes
Sep 19, 2026
xmacan
approved these changes
Sep 19, 2026
|
this sounds odd to me as it seems like you are making Cacti Linux flavor specific. Many systems may not even have www-data and use apache:apache or any other variant. My files are apache and poller runs as root. |
bmfmancini
approved these changes
Sep 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The poller currently runs via 'sudo php poller.php' (root). This activates a root-only ownership-reassignment code path in Cacti's rrdtool_function_create() (lib/rrd.php): after creating the first-run RRDs for the default 'Local Linux Machine' graphs, it logs 'RRD file ... does not exist for ownership assignment' as an ERROR, which the 'Check Cacti Logs for Errors' step then treats as a hard CI failure.
Fix: re-apply www-data ownership immediately before polling and run the poller as www-data (sudo -u www-data) instead of root, so that root-only ownership-reassignment branch never triggers.
Same pattern already verified working in plugin_evidence/plugin_flowview/plugin_wmi etc.