nextcloud / nextcloud/docker

Optionally disable "--chown www-data:root" when upgrading

Open
#1,344 9 comments 15 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

data persistence enhancement feature: auto config (environment variables) needs review
Dominant language
Shell
Stars
7.4k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

Using nextcloud in containers with NFS as backend storage for /var/www/html (with proper anonuid=82 and anongid=0 to match www-data:root ownership), the rsync process complains:

rsync: chown "/var/www/html/whatever" failed: Operation not permitted (1)

Using the NFS flags already mentioned ensures the ownership so there is no need to change it (and if you want to do it, it fails).

I guess having an environment variable that is used by the entrypoint.sh script can be good enough (?)

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 in entrypoint.sh and trace the upgrade path that invokes rsync with --chown www-data:root. Add an environment-controlled way to omit that ownership change for NFS-backed /var/www/html, while preserving the current behavior by default; verify the resulting command in a container configured like the issue describes.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, shell
Domain
devops
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.