mkdir cannot create directory var lib grafana plugins Permission denied

0 votes

Hi Guys,

I am trying to launch a docker container for Grafana. But I am getting the below error.

$ docker run -d -p 3000:3000 --user grafana --name grafana -e "GF_SECURITY_ADMIN_PASSWORD=changeme" -v /grafana_db:/var/lib/grafana grafana/grafana
GF_PATHS_DATA='/var/lib/grafana' is not writable. You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migration-from-a-previous-version-of-the-docker-container-to-5-1-or-later mkdir: cannot create directory '/var/lib/grafana/plugins': Permission denied
Sep 7, 2020 in Docker by akhtar
• 38,260 points
18,953 views

1 answer to this question.

0 votes

Hi@akhtar,

You are getting this error because Grafana needs a user that has 472 user ID. But you have not set the permissions for user/group 472. You have set the permission for Grafana user. So make changes and rerun your command. You can use the below command to set the permissions.

$ sudo chown -R 472:472 /mnt/data/grafana/
answered Sep 7, 2020 by MD
• 95,460 points

Related Questions In Docker

+2 votes
2 answers
0 votes
1 answer

docker missing var/lib/docker folder

Try restarting docker systemctl restart docker or sudo service docker ...READ MORE

answered Aug 1, 2018 in Docker by Kalgi
• 52,340 points
8,028 views
0 votes
1 answer
+2 votes
1 answer
+4 votes
1 answer

How do I go from development docker-compose.yml to deployed docker-compose.yml in AWS

It can work if you try to put ...READ MORE

answered Jun 7, 2018 in AWS by Cloud gunner
• 4,670 points
7,545 views