nextcloud / nextcloud/updater

[Bug]: Web updater breaks file permissions and causes 500 errors

Open
#614 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage bug needs info
Dominant language
PHP
Stars
51
Forks
40
Avg merge
2d 19h
Merged PRs (30d)
3

Description

⚠️ This issue respects the following points: ⚠️
Bug description

I updated my Nextcloud instance using the built-in web updater. After the update completed, the instance returned a 500 Internal Server Error with no useful feedback in the logs.

Upon investigation, I found that:
• nextcloud.log was not being written to
• Apache error logs were unhelpful
• The actual issue was that the file and directory permissions had been changed, and ownership was no longer set to www-data:www-data

Manually running: sudo chown -R www-data:www-data /var/www/nextcloud
sudo find /var/www/nextcloud/ -type d -exec chmod 750 {} ;
sudo find /var/www/nextcloud/ -type f -exec chmod 640 {} ;

Resolved the issue.

This is the second time this has happened. The updater should either:
• Restore correct permissions at the end
• Alert the user that shell access will be required to manually fix this

Please fix or document this more clearly, as this breaks production instances that use the GUI for updates.

Steps to reproduce
  1. Open Admin
  2. Run GUI Updater
  3. Wait for this to happen
Expected behavior

I expected the update to finish and not think about it. It is an update wizard, it kind of should just work.

Nextcloud Server version

30

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.3

Web server

None

Database engine version

None

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?
  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other
Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

No response

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 at the Admin GUI Updater entry point and reproduce the update on the reported Debian/Ubuntu and PHP 8.3 setup. Investigate how the updater handles file ownership and permissions after completion. Done means the update preserves usable permissions or clearly alerts users when shell access is required to repair them.

Written by the indexing model from the issue text.

Assessment

Tech stack
debian, php, ubuntu
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.