Skip to content

[Bug]: Installing with Portainer in Docker Swarm mode with a Stack has installation problem due to oc_admin6 insufficient permissions. #1980

Closed as not planned

Description

@as-shura

⚠️ This issue respects the following points: ⚠️

  • This is a bug, not a question or a configuration/webserver/proxy issue.
  • This issue is not already reported on Github (I've searched it).
  • Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • Nextcloud Server is running on 64bit capable CPU, PHP and OS.
  • I agree to follow Nextcloud's Code of Conduct.

Bug description

Based on this docker-compose yaml file the permissions created by the install wizard for the oc_admin6 are insufficient. The installer breaks at some point while filling the Postgres DB.

Steps to reproduce

In Portainer with Docker swarm mode use this yaml stack. Note that the db container was created in a separate stack. We use only one DB stack shared by many services pointing to the same Postgres DB.

version: '3.2'
services:
  nextcloud:
    image: nextcloud
    restart: always
    deploy:
      placement:
        constraints:
          - node.labels.hostname == node2
    ports:
      - 9090:80
    volumes:
      - nextcloud:/var/www/html
    environment:
      - POSTGRES_HOST=db
      - POSTGRES_DB=nextcloud
      - POSTGRES_USER=root
      - POSTGRES_PASSWORD=root
      - POSTGRES_PORT=5432
    depends_on:
      - db
    networks:
      - database-postgres-net

  cron:
    image: nextcloud
    restart: always
    deploy:
      placement:
        constraints:
          - node.labels.hostname == node2
    volumes:
      - nextcloud:/var/www/html
    entrypoint: /cron.sh
    depends_on:
      - db
    networks:
      - database-postgres-net
      
networks:
  database-postgres-net:
    external: true

volumes:
  nextcloud:

Expected behavior

Perfect first installation process achieved successfully.

Installation method

Community Docker image

Nextcloud Server version

24

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Apache (supported)

Database engine version

PostgreSQL

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

Fresh Nextcloud Server install

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

nothing

List of activated Apps

nothing

Nextcloud Signing status

nothing

Nextcloud Logs

nothing

Additional info

After checking the user privileges in pgAdmin 4

image

After changing it to this the install process was successful

image

Activity

  1. transferred this issue fromnextcloud/serveron May 11, 2023
  2. joshtrichards commented on May 19, 2023

    @joshtrichards
    Member

    Are you by chance trying to use NC24 with PostgreSQL v15? (That's never been a supported combination!).

    Because this sounds a lot like the issue with GRANT CREATE ON SCHEMA public TO username in nextcloud/server#34645

    You'll see the PostgreSQL doc section in later NC versions are a little different to accommodate PG15 privilege setup too:

    https://docs.nextcloud.com/server/25/admin_manual/configuration_database/linux_database_configuration.html?highlight=postgresql

    NC25 was the first one to support PostgreSQL v15:

    https://docs.nextcloud.com/server/24/admin_manual/installation/system_requirements.html#server
    versus
    https://docs.nextcloud.com/server/25/admin_manual/installation/system_requirements.html#server

    You might be able to get it to work with NC24, but you're on your own. :)

    Give things a try with at least v25.0.2 (preferably v25.0.6 though) and I think this issue goes away...

  3. joshtrichards commented on Jan 4, 2024

    @joshtrichards
    Member

    Closing due to insufficient information to do anything else actionable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions