Skip to content

ci: run poller as www-data to avoid RRD ownership errors - #367

Merged
TheWitness merged 1 commit into
developfrom
ci/fix-poller-permissions
Sep 19, 2026
Merged

TheWitness merged 1 commit into
developfrom
ci/fix-poller-permissions

Conversation

@TheWitness

Copy link
Copy Markdown
Member

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.

Copilot AI lite review requested due to automatic review settings September 19, 2026 15:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.php as www-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.

@TheWitness
TheWitness merged commit 87a69d1 into develop Sep 19, 2026
15 checks passed
@jdcoats

jdcoats commented Sep 19, 2026

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants