docker-influxdb-grafana icon indicating copy to clipboard operation
docker-influxdb-grafana copied to clipboard

Grafana fails on start due to file system perms

Open nickman opened this issue 6 years ago • 4 comments

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

nickman avatar Aug 15 '18 22:08 nickman

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

chasgames avatar Nov 15 '18 15:11 chasgames

user: "0"

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

I have this problem after adding user to grafana.

freelanseod avatar May 21 '19 11:05 freelanseod

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

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

freddyrayes avatar Jul 06 '19 05:07 freddyrayes