nextcloud / nextcloud/helm

nextcloud-cron does not work in OpenShift

Open
#733 5 comments 1 reaction 1 assignee View on GitHub

@varet80 is already working on this.

Since Jul 13, 2025.

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

Description

Describe your Issue

In OpenShift kubernetes cluster, with restricted-v2 pod policy, the UID is within a range. The volume data belongs to the first UID of this range, instead of www-data, which will result in a permission error.

Logs and Errors
crond: USER www-data pid 333 cmd php -f /var/www/html/cron.php
crond: can't set groups: Operation not permitted
crond: USER www-data pid 337 cmd php -f /var/www/html/cron.php
crond: can't set groups: Operation not permitted
crond: USER www-data pid 341 cmd php -f /var/www/html/cron.php
crond: can't set groups: Operation not permitted
crond: USER www-data pid 342 cmd php -f /var/www/html/cron.php

Describe your Environment

  • Kubernetes distribution:
    OKD 4.15

  • Helm Version (or App that manages helm):

  • Helm Chart Version:
    nextcloud helm 6.6.7

  • values.yaml:

cronjob:
  #enabled: false
  enabled: true
  #securityContext: {}
  securityContext:
    runAsUser: null
    runAsGroup: null
    runAsNonRoot: true

Additional context, if any

Inside the container, some info:

1004080000@my-nextcloud-6b9695ccfb-spplh:/var/www/html$ id
uid=1004080000(1004080000) gid=0(root) groups=0(root),1004080000

1004080000@my-nextcloud-6b9695ccfb-spplh:/var/www/html$ ls -al /var/www/html/cron.php
-rw-r--r--. 1 1004080000 1004080000 7550 May 27 12:50 /var/www/html/cron.php

1004080000@my-nextcloud-6b9695ccfb-spplh:/var/www/html$ cat /etc/passwd | grep -e www-data -e 1004080000
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
1004080000:x:1004080000:0:1004080000 user:/:/sbin/nologin

1004080000@my-nextcloud-6b9695ccfb-spplh:/var/www/html$ cat /var/spool/cron/crontabs/www-data
*/5 * * * * php -f /var/www/html/cron.php

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.