nextcloud / nextcloud/helm

Failed opening required '/var/www/html/lib/versioncheck.php'

Open
#584 9 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go Template
Stars
534
Forks
314
Avg merge
42m
Merged PRs (30d)
1

Description

Hi,
I use the official helm chart to deploy nextcloud on our internal kubernetes instance. The container went unhealthy every time. I disabled the probes. The container is marked as ready but I can not connect to the nextcloud, neither via browser or curl.

I connect into the container and want to execute php occ to get some logs, because php does not write their logs on stdout. I get the following error message:

$ php occ

Warning: require_once(/var/www/html/lib/versioncheck.php): failed to open stream: No such file or directory in /var/www/html/console.php on line 35

Fatal error: require_once(): Failed opening required '/var/www/html/lib/versioncheck.php' (include_path='.:/usr/local/lib/php') in /var/www/html/console.php on line 35

The complete lib folder is not available.

$ ls -la
total 108
drwxr-xr-x 1 www-data root   304 Jun 13 10:17 .
drwxr-xr-x 1 root     root    14 Jun 13 10:01 ..
-rw-r--r-- 1 www-data root  3032 Jun 13 10:17 .htaccess
-rw-r--r-- 1 www-data root   101 Jun 13 10:17 .user.ini
drwxr-xr-x 1 www-data root   778 Jun 13 10:17 3rdparty
-rw-r--r-- 1 www-data root 17234 Jun 13 10:17 AUTHORS
-rw-r--r-- 1 www-data root 34520 Jun 13 10:17 COPYING
drwxr-xr-x 1 www-data root  1098 Jun 13 10:15 apps
drwxr-xr-x 1 www-data root     0 Jun 13 10:01 config
-rw-r--r-- 1 www-data root  3893 Jun 13 10:17 console.php
-rw-r--r-- 1 www-data root  5083 Jun 13 10:17 cron.php
drwxr-xr-x 1 www-data root     0 Jun 13 10:01 custom_apps
drwxr-xr-x 1 www-data root     0 Jun 13 10:01 data
-rw-r--r-- 1 www-data root   156 Jun 13 10:17 index.html
-rw-r--r-- 1 www-data root  2960 Jun 13 10:17 index.php
-rwxr-xr-x 1 www-data root   283 Jun 13 10:17 occ
-rw-r--r-- 1 www-data root  3102 Jun 13 10:17 public.php
-rw-r--r-- 1 www-data root  5332 Jun 13 10:17 remote.php
-rw-r--r-- 1 www-data root    26 Jun 13 10:17 robots.txt
-rw-r--r-- 1 www-data root  2379 Jun 13 10:17 status.php
drwxr-xr-x 1 www-data root     0 Jun 13 10:01 themes

I tried additionally the nginx + fpm setup. There I run into the same error. I upgraded the image to 20.0.4-apache. This is the same image as we have deployed on a docker host. I removed the complete persistent volume, so that the containter can recreate the complete data directory, but I get this error, too. The lib directory is not available.

How is this possible that the directory is missing and how can I fix it? Here is an old thread with the same issue. It seems to be not fixed.

Next, I found that the permissions of the directory /var/www/html are incomplete. The owner/group of all mounted volumes is root:root. I changed the permissions manually to www-data:root. Otherwise has the container no access to the mounted directories. This should also be fixed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the Helm chart's mounted paths with the Docker image filesystem, focusing on /var/www/html/lib/versioncheck.php and console.php. Reproduce the deployment with image 20.0.4-apache and inspect the mounted-volume ownership. Done means php occ can run and the container can access its mounted directories without manual permission changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, helm, kubernetes
Domain
cloud, devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.