Plugins folder ownership

Grafana v6.0.2 running on Raspbian stretch.

The folder ownership for my /var/lib/grafana/plugins is recursively grafana:grafana, and whenever I try to install a plugin via the grafana-cli it fails;

$ grafana-cli plugins install digiapulssi-breadcrumb-panel
Error: ✗ Could not create /var/lib/grafana/plugins/digiapulssi-breadcrumb-panel. Permission denied. Make sure you have write access to plugindir

If I run the grafana-cli command using sudo, the plugin is installed, but the plugin then has the ownership root:root

Is this how things should be??


try to change the ownership to grafana

chown -R grafana.grafana digiapulssi-breadcrumb-panel

Yes, that’s what I’ve done with the other plugins, but it doesn’t seem right that we should need to do so.

Surely the grafana-cli should overcome and sort this as part of the module installation process???

Should I raise this as a git issue?

Git issue submitted -

Torkel Ödegaard replied in the git issue;

“You need to “sudo” the plugins install, if root owns it will still be fine. as long as grafana user can read it.
Grafana will change the ownership next time you install (which is why the older plugins have grafana owner)”