I am running Grafana in a docker image. My database lives on a EBS volume that is mounted to the aws hosts. This is configured in docker to allow the host access.
I followed the document about changing the user when upgrading to 5.x. I changed user and group to 472 and I am still getting database errors.
My database path in the container
grafana@e63a6b500d09:/$ ls -lsa /var/lib/grafana/
total 1492
4 drwxr-xr-x. 5 root root 4096 Nov 8 21:37 .
4 drwxr-xr-x. 9 root root 4096 Oct 24 12:20 …
868 -rw-r–rw-. 1 grafana grafana 884736 Nov 8 21:12 grafana.db
600 -rw-r–r--. 1 grafana grafana 611328 Nov 8 20:34 grafana.db.bak
4 -rw-r–r--. 1 root root 125 May 17 2017 grafana.ini
4 drwxr-xr-x. 4 grafana grafana 4096 May 26 2017 plugins
4 drwxr-xr-x. 2 grafana grafana 4096 May 25 2017 png
4 drwx------. 18 grafana grafana 4096 Jun 17 2017 sessions
Permission on the ebs disk
[root@monitor01 grafana]# ls -lsa
total 1492
4 drwxr-xr-x. 5 root root 4096 Nov 8 21:37 .
4 drwxr-xr-x. 8 root root 4096 Nov 8 16:39 …
868 -rw-r–rw-. 1 472 472 884736 Nov 8 21:12 grafana.db
600 -rw-r–r--. 1 472 472 611328 Nov 8 20:34 grafana.db.bak
4 -rw-r–r--. 1 root root 125 May 17 2017 grafana.ini
4 drwxr-xr-x. 4 472 472 4096 May 26 2017 plugins
4 drwxr-xr-x. 2 472 472 4096 May 25 2017 png
4 drwx------. 18 472 472 4096 Jun 17 2017 sessions
Error Messages from the docker container
t=2018-11-08T22:17:31+0000 lvl=eror msg=“Failed to update last_seen_at” logger=context userId=1 orgId=1 uname=admin error=“attempt to write a readonly database”
t=2018-11-08T22:17:31+0000 lvl=eror msg=“Failed to update last_seen_at” logger=context userId=1 orgId=1 uname=admin error=“attempt to write a readonly database”
t=2018-11-08T22:17:31+0000 lvl=eror msg=“Failed to update last_seen_at” logger=context userId=1 orgId=1 uname=admin error=“attempt to write a readonly database”
t=2018-11-08T22:17:31+0000 lvl=eror msg=“Failed to update last_seen_at” logger=context userId=1 orgId=1 uname=admin error=“attempt to write a readonly database”
t=2018-11-08T22:17:31+0000 lvl=eror msg=“Failed to update last_seen_at” logger=context userId=1 orgId=1 uname=admin error="attempt to write a readonly databas