Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied #4

Open
coding-to-music opened this issue Jul 6, 2022 · 1 comment

Comments

@coding-to-music
Copy link

I am attempting this tutorial: https://github.com/questdb/questdb-slack-grafana-alerts

My repo is here: https://github.com/coding-to-music/questdb-slack-grafana-alerts

When I run docker-compose up I get these messages:

Errors and Messages

Attaching to grafana_alerts, questdb_alerts
grafana_alerts | mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
grafana_alerts | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana_alerts | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later

Steps attempted to fix

When I run this

id -u
1000

I see that I am user 1000, so I tried that in addition to user 472

Per the recommendation of this page: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later

I have added this line to the docker-compose.yml

user: "472"

I have attempted to remove the directory /var/lib/grafana and also change it's ownership

I have tried changing the target directory ownership

and run docker-compose up as that user specified in the grafana-->user string

sudo chown 472:472 /var/lib/grafana 
sudo chown 472:472 /var/lib/grafana/plugins 

sudo chown 1000:1000 /var/lib/grafana 
sudo chown 1000:1000 /var/lib/grafana/plugins 

Similar problem reports:

https://community.grafana.com/t/gf-paths-data-var-lib-grafana-is-not-writable/31369

cfbarbero/tick-grafana-docker#1

Any assistance is appreciated

@Artmorse
Copy link

Artmorse commented May 1, 2023

The easiest way to fix your issue is to set the volume with a docker volume, I have created the PR #5.

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

No branches or pull requests

2 participants