Owncloud MariaDB permission denied after moving data to a network mounted drive

Hi everyone, I was running my own owncloud stack on a Hetzner mounted volume and everything was going well. I recently had to switch to a new Hetzner network drive that I mounted by following the instructions over on the docs. After running the mount.cifs command and following the steps, I used the mv command in order to transfer my whole owncloud stack to the new drive called sbox1 . Now after changing the respective mount points in the docker-compose.yml file via Portainer (went from /mnt/volume-nbg1 to /mnt/sbox1 ) I started getting the following error which leads to MariaDB failing and restarting: portainer logs.

After searching around a bit, it seems like something got messed up with the permissions that the owncloud_mariadb container has, am I right on that? What do I need to change in order to get it its access back? I also imagine that there must be some database related files that need to be updated after such a major move. I saw this guide but I’m not using apache or have any database tools installed.

Here’s my docker-compose.yml file from the portainer editor:

version: "3"
 
services:
  owncloud:
    image: owncloud/server:latest
    container_name: owncloud_server
    restart: always
    ports:
      - [REDACTED]:8080
    depends_on:
      - mariadb
      - redis
    environment:
      - PUID=0
      - PGID=0
      - OWNCLOUD_FOLDER=/mnt/sbox1/owncloud/data
      - OWNCLOUD_DOMAIN=[REDACTED]
      - OWNCLOUD_DB_TYPE=mysql
      - OWNCLOUD_DB_NAME=owncloud
      - OWNCLOUD_DB_USERNAME=owncloud
      - OWNCLOUD_DB_PASSWORD=[REDACTED]
      - OWNCLOUD_DB_HOST=mariadb
      - OWNCLOUD_ADMIN_USERNAME=[REDACTED]
      - OWNCLOUD_ADMIN_PASSWORD=[REDACTED]
      - OWNCLOUD_MYSQL_UTF8MB4=true
      - OWNCLOUD_REDIS_ENABLED=true
      - OWNCLOUD_REDIS_HOST=redis
    volumes:
      - /mnt/sbox1/owncloud/data:/mnt/data
 
  mariadb:
    image: mariadb:10.5
    container_name: owncloud_mariadb
    restart: always
    environment:
      - MYSQL_ROOT_PASSWORD=[REDACTED]
      - MYSQL_USER=owncloud
      - MYSQL_PASSWORD=[REDACTED]
      - MYSQL_DATABASE=owncloud
      - PUID=0
      - PGID=0
    volumes:
      - /mnt/sbox1/owncloud/mariadb:/var/lib/mysql
 
  redis:
    image: redis:6
    container_name: owncloud_redis
    restart: always
    volumes:
      - /mnt/sbox1/owncloud/redis:/data

The only thing that was changed after the drive switch was the volume mapping, like I mentioned above.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.