From 8ae26d705abe341b03bc15d4373d6cd0c77c0baf Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 17 Mar 2020 12:09:52 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- doc/administration/pages/index.md | 45 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'doc/administration/pages') diff --git a/doc/administration/pages/index.md b/doc/administration/pages/index.md index 08d0cb6d691..ce7d2fa3e73 100644 --- a/doc/administration/pages/index.md +++ b/doc/administration/pages/index.md @@ -566,6 +566,51 @@ GitLab Pages are part of the [regular backup][backup], so there is no separate b You should strongly consider running GitLab Pages under a different hostname than GitLab to prevent XSS attacks. + + +## Troubleshooting + +### `open /etc/ssl/ca-bundle.pem: permission denied` + +GitLab Pages runs inside a `chroot` jail, usually in a uniquely numbered directory like +`/tmp/gitlab-pages-*`. + +Within the jail, a bundle of trusted certificates is +provided at `/etc/ssl/ca-bundle.pem`. It's +[copied there](https://gitlab.com/gitlab-org/gitlab-pages/-/merge_requests/51) +from `/opt/gitlab/embedded/ssl/certs/cacert.pem` +as part of starting up Pages. + +If the permissions on the source file are incorrect (they should be `0644`) then +the file inside the `chroot` jail will also be wrong. + +Pages will log errors in `/var/log/gitlab/gitlab-pages/current` like: + +```plaintext +x509: failed to load system roots and no roots provided +open /etc/ssl/ca-bundle.pem: permission denied +``` + +The use of a `chroot` jail makes this error misleading, as it is not +referring to `/etc/ssl` on the root filesystem. + +The fix is to correct the source file permissions and restart Pages: + +```shell +sudo chmod 644 /opt/gitlab/embedded/ssl/certs/cacert.pem +sudo gitlab-ctl restart gitlab-pages +``` + [backup]: ../../raketasks/backup_restore.md [ce-14605]: https://gitlab.com/gitlab-org/gitlab-foss/issues/14605 [ee-80]: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/80 -- cgit v1.2.1