Skip to content

[Bug]: PostgreSQL database GRANTs out-of-date (was "db:add-missing-indices not working anymore") #2761

@neeral85

Description

@neeral85

⚠️ This issue respects the following points: ⚠️

Bug description

command sudo -u www-data php /var/www/nextcloud/occ db:add-missing-indices reports Insufficient privilege.

with 31.0.7 the command runs as expected. adter upgrade to 31.0.8 I get this errors:

In ExceptionConverter.php line 87:

  An exception occurred while executing a query: SQLSTATE[42501]: Insufficient privilege: 7 ERROR:  permission denied for schema public

In Exception.php line 24:

  SQLSTATE[42501]: Insufficient privilege: 7 ERROR:  permission denied for schema public

In Connection.php line 33:

  SQLSTATE[42501]: Insufficient privilege: 7 ERROR:  permission denied for schema public

Steps to reproduce

  1. sudo -u www-data php /var/www/nextcloud/occ db:add-missing-indices

Expected behavior

no error

Nextcloud Server version

31

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.3

Web server

Apache (supported)

Database engine version

PostgreSQL

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

Updated from a MINOR version (ex. 32.0.1 to 32.0.2)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

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

No errors have been found.

Nextcloud Logs

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions