Permission denied error when starting Grafana docker container
Applies to
- ONTAP 9
- NFS
- Docker Containers
Issue
- After attempting to mount a unix volume on a Linux client and starting the container, it reports
permission denied
.
root@host1:/home/rdapiqw/shared_source/apisix_sr_20250722# docker logs -f apisix_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/#migrate-to-v51-or-later
mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
GF_PATHS_DATA='/var/lib/grafana' is not writable.
- Docker Compose Configuration
grafana:
image: grafana/grafana:${GRAFANA_VERSION}
container_name: apisix_grafana
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_USER}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}
volumes:
- /home/rdapiqw/shared source/grafana-storage:/var/lib/grafana:rw
- ./grafana/provisioning:/etc/grafana/provisioning
depends_on:
- prometheus
- loki
restart: unless-stopped
- There are no issues with the volume's export policy rule settings.