Skip to content

Updater instructs to run ./occ upgrade, but occ is not executable on standard installations #777

Description

@gbrn

⚠️ This issue respects the following points: ⚠️

Bug description

After updating Nextcloud in Ubuntu, using the CLI updater, the final message is:
Current version is 31.0.14.
Update to Nextcloud 32.0.12.

Should the "occ upgrade" command be executed? [Y/n] y
Please now execute "./occ upgrade" to finish the upgrade.

However, on a standard Linux installation, the suggested command does not work:

./occ upgrade

Result:

-bash: ./occ: Permission denied

The reason is that the occ file is not executable by default, and the recommended way to run OCC commands is through PHP.

The following commands work correctly:

sudo -u www-data php occ upgrade

or

sudo -u www-data php ./occ upgrade

I believe the updater message should be updated to recommend executing php occ upgrade (or mention that the command should be run through PHP), as the current instruction may confuse users and make it appear that the update has failed.

Steps to reproduce

Type: ./occ upgrade

Expected behavior

After the updater finishes, it should display a command that works on a standard Nextcloud installation.

Instead of:

./occ upgrade

it should suggest:

php occ upgrade

or, when applicable:

sudo -u www-data php occ upgrade

This would prevent confusion and ensure that users can complete the upgrade without encountering a "Permission denied" error.

Nextcloud Server version

32

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.4

Web server

Apache (supported)

Database engine version

MySQL

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

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status
    Triaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions