Several months back I accidentally did a chown at the wrong level on our gitlab host and accidentally changed the user for all gitlab files !! My solution at the time was to create a docker container, look at the ownership of the various directories and then changed them to these. So far so good. However I was tracing earlier and noticed repeated errors of the form:
2020-11-30_17:48:38.78046 Service init failed: failed to connect to database: can’t check for existence of “/var/opt/gitlab/grafana/data/grafana.db”: stat /var/opt/gitlab/grafana/data/grafana.db: permission denied
I assume this is a left over from that issue and that the ownership under
/var/opt/gitlab/grafana is wrong. I have the following, can anybody tell me what it should be?
-rw-------. 1 git gitlab-prometheus 577536 Sep 1 2019 /var/opt/gitlab/grafana/data.bak.2019-09-01/grafana.db
-rw-------. 1 git gitlab-prometheus 741376 Aug 20 09:13 /var/opt/gitlab/grafana/data/grafana.db
-rw-r–r–. 1 gitlab-prometheus root 12597 Sep 19 11:40 /var/opt/gitlab/grafana/grafana.ini
-rw-r–r–. 1 gitlab-prometheus root 225 Jun 29 2019 /var/opt/gitlab/grafana/provisioning/dashboards/gitlab_dashboards.yml
-rw-r–r–. 1 gitlab-prometheus root 136 Jun 29 2019 /var/opt/gitlab/grafana/provisioning/datasources/gitlab_datasources.yml
BTW: This directory does not seem to exist out-of-the-box in a docker image.