MariaDB permissions error 13
Posted: 22 May 2023, 18:44
I've recently done a fresh install of 5.1.34, but my previous docker composes no longer work. My compose files are below. In both instances, nextcloud-app and npm-app work fine, but mariadb and mariadb-aria both show similar errors. The following is from the mariadb-aria logs.
Based on the description and error code 13, there seems to be some permissions errors. I've tried to do chmod 777 on the container volumes, but this has no effect. I can proceed if I use sqlite from within the app (npm-app, nextcloud-app), but this isn't really going to be feasible for nextcloud. The issues only seem to affect the databases. Any idea how to resolve this?
My Nextcloud compose file is:
My Nginx Proxy Manager compose file is:
Code: Select all
[i] Creating user: npm with password
2023-05-22 10:30:57 0 [Note] /usr/bin/mysqld (mysqld 10.4.15-MariaDB) starting as process 50 ...
2023-05-22 10:30:57 0 [ERROR] mysqld: File '/var/lib/mysql/aria_log_control' not found (Errcode: 13 "Permission denied")
2023-05-22 10:30:57 0 [ERROR] mysqld: Got error 'Can't open file' when trying to use aria control file '/var/lib/mysql/aria_log_control'
2023-05-22 10:30:57 0 [ERROR] Plugin 'Aria' init function returned error.
2023-05-22 10:30:57 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
2023-05-22 10:30:57 0 [Note] Plugin 'InnoDB' is disabled.
2023-05-22 10:30:57 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-05-22 10:30:57 0 [ERROR] Failed to initialize plugins.
2023-05-22 10:30:57 0 [ERROR] Aborting
/scripts/run.sh: ignoring or entrypoint initdb empty /docker-entrypoint-initdb.d/*
MySQL init process done. Ready for start up.
exec /usr/bin/mysqld --user=mysql --console --skip-name-resolve --skip-networking=0
2023-05-22 10:30:57 0 [Note] /usr/bin/mysqld (mysqld 10.4.15-MariaDB) starting as process 1 ...
2023-05-22 10:30:57 0 [ERROR] mysqld: File '/var/lib/mysql/aria_log_control' not found (Errcode: 13 "Permission denied")
2023-05-22 10:30:57 0 [ERROR] mysqld: Got error 'Can't open file' when trying to use aria control file '/var/lib/mysql/aria_log_control'
2023-05-22 10:30:57 0 [ERROR] Plugin 'Aria' init function returned error.
2023-05-22 10:30:57 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
2023-05-22 10:30:57 0 [Note] Plugin 'InnoDB' is disabled.
2023-05-22 10:30:57 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-05-22 10:30:57 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
2023-05-22 10:30:57 0 [ERROR] Failed to initialize plugins.
2023-05-22 10:30:57 0 [ERROR] Aborting
My Nextcloud compose file is:
Code: Select all
version: "3.9"
volumes:
data:
db:
networks:
npm_default:
# add this if the network is already existing!
external: true
default:
services:
app:
image: nextcloud:latest
container_name: nextcloud-app
network_mode: bridge
restart: unless-stopped
volumes:
- data:/var/www/html
- type: bind
source: /Volume1/Disk1
target: /Disk1
environment:
- MYSQL_PASSWORD=
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_HOST=nextcloud-db
- PHP_MEMORY_LIMIT=1536M
- PHP_UPLOAD_LIMIT=1536000M
networks:
- npm_default
- default
depends_on:
- "db"
db:
image: mariadb:latest
container_name: nextcloud-db
restart: always
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
volumes:
- db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=
- MYSQL_PASSWORD=
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
networks:
- default
Code: Select all
version: "3.9"
volumes:
data:
ssl:
db:
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
# These ports are in format <host-port>:<container-port>
- '80:80' # Public HTTP Port
- '443:443' # Public HTTPS Port
- '81:81' # Admin Web Port
environment:
DB_MYSQL_HOST: "db"
DB_MYSQL_PORT: 3306
DB_MYSQL_USER: "npm"
DB_MYSQL_PASSWORD:
DB_MYSQL_NAME: "npm"
# Uncomment this if IPv6 is not enabled on your host
DISABLE_IPV6: 'true'
volumes:
- data:/data
- ssl:/etc/letsencrypt
depends_on:
- db
db:
image: 'jc21/mariadb-aria:latest'
restart: always
environment:
MYSQL_ROOT_PASSWORD:
MYSQL_DATABASE: 'npm'
MYSQL_USER: 'npm'
MYSQL_PASSWORD:
volumes:
- db:/var/lib/mysql