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

Grafana fails on start due to file system perms #5

Open
nickman opened this issue Aug 15, 2018 · 4 comments
Open

Grafana fails on start due to file system perms #5

nickman opened this issue Aug 15, 2018 · 4 comments

Comments

@nickman
Copy link

nickman commented Aug 15, 2018

grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana | 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
grafana | mkdir: cannot create directory '/var/lib/grafana/plugins': Permission denied
grafana exited with code 1

@chasgames
Copy link

I added user: "0" as a workaround which got the container up and running, so the grafana part looks like this:

  image: grafana/grafana:latest
  container_name: grafana
  ports:
    - "3000:3000"
  env_file:
    - 'env.grafana'
  user: "0"
  links:
    - influxdb
  volumes:
    # Data persistency
    # sudo mkdir -p /srv/docker/grafana/data; chown 472:472 /srv/docker/grafana/data
    - /srv/docker/grafana/data:/var/lib/grafana

@freelanseod
Copy link

user: "0"

grafana     | mkdir: cannot create directory '/var/lib/grafana/plugins': Permission denied

I have this problem after adding user to grafana.

@strategicenterprisesolutions
Copy link
Contributor

strategicenterprisesolutions commented May 22, 2019

Looks to be associated with directory perms, try running on the docker host:
sudo chown -R 472:472 /srv/docker/grafana/data

@freddyrayes
Copy link

Is there a permanent fix rather than having to chown the local grafana directory every-time I create a new deployment on a machine?

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

5 participants