Permissions issue with Volumes

maddsua
HOBBY

a year ago

I'm trying to move grafana data to a volume, but grafana refuses to start complaining about the directory being inaccessible:

Starting Container
Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/0181e1c6-9f08-419a-96dd-4c9674a44fab/vol_1c8bj2snj0ah4se7
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
container event container died

It makes no difference if I mount to /var/lib/grafana or to /data and update ENV vars to point there.

There are forum posts suggesting to run container with certain user/group set, so the question is: any way to do this on railway?

1 Replies

a year ago

RAILWAY_RUN_UID=0


maddsua
HOBBY

a year ago

what can I say, it worked


maddsua
HOBBY

a year ago

thanks Brody!


a year ago

last bullet point 🙂


wangxuedong
PROTop 10% Contributor

2 months ago

Thanks


Permissions issue with Volumes - Railway Help Station