Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Support Installation & Updates
  1. OpenProject
  2. Forums
  3. Support Installation & Updates
  4. ERROR: permission denied to create extension "btree_gist" (Ubuntu 18.04 > 20.04 PG 9.5 > 12)

ERROR: permission denied to create extension "btree_gist" (Ubuntu 18.04 > 20.04 PG 9.5 > 12)

Added by ravenous bugblatterbeast over 1 year ago

After upgrading from Ubuntu 18.04 to 20.04 "sudo openproject configure" failed because the database version was insufficient. I upgraded to PG 12, following the instructions here https://gorails.com/guides/upgrading-postgresql-version-on-ubuntu-server. After that I retried to run the configuration script but got an error.

-- execute("CREATE EXTENSION IF NOT EXISTS btree_gist; ALTER TABLE journals ADD CONSTRAINT non_overlapping_journals_validity_periods EXCLUDE USING gist (journable_id WITH =, journable_type WITH =, validity_period WITH &&) DEFERRABLE")
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

PG::InsufficientPrivilege: ERROR:  permission denied to create extension "btree_gist"
HINT:  Must be superuser to create this extension.

Configuration script was called as root. Database user for openproject is not privileged though.

EDIT:

This is how the access privileges of the database look like

# \l
                                     List of databases
   Name     |    Owner    | Encoding |   Collate   |    Ctype    |    Access privileges     
-------------+-------------+----------+-------------+-------------+--------------------------
openproject | postgres    | UTF8     | en_GB.UTF-8 | en_GB.UTF-8 | postgres=CTc/postgres   +
            |             |          |             |             | =Tc/postgres            +
            |             |          |             |             | openproject=CTc/postgres

/EDIT


Replies (1)

RE: ERROR: permission denied to create extension "btree_gist" (Ubuntu 18.04 > 20.04 PG 9.5 > 12) - Added by ravenous bugblatterbeast over 1 year ago

I was impatient and temporarily assigned postgresql user "openproject" the role SUPERUSER.

That fixed the issue for me. It's probably not how the upgrade should be done, though. I'd still be interested to know what's wrong with my configuration.

  • (1 - 1/1)
Loading...