-
Notifications
You must be signed in to change notification settings - Fork 443
Open
Description
Hello,
I cannot get past this error when starting a container. I have set the permissions to every possible combination.
�/usr/sbin/mariadbd: Can't change dir to '/var/lib/mysql/' (Errcode: 13 "Permission denied")
It is in a file with Firefly III and an alpine container. Both of those start and run without error.
Container YAML
services:
app:
image: fireflyiii/core:latest
hostname: app
container_name: firefly_iii_core
restart: unless-stopped
volumes:
- /volume1/VSS/FireflyIII/firefly_iii_upload:/var/www/html/storage/upload
- /volume1/VSS/FireflyIII/firefly_iii_mariadb:/var/lib/mysql
environment:
- PUID=# My admin user ID
- PGID=# Adminuser group ID. I've also used a new user and group ID
- TZ=America/Detroit
- USE_RUNNING_BALANCE=false
- FIREFLY_III_LAYOUT=v1
- APP_NAME=FireflyIII
- BROADCAST_DRIVER=log
- QUEUE_DRIVER=sync
- CACHE_PREFIX=firefly
- DKR_BUILD_LOCALE=false
- DKR_CHECK_SQLITE=true
- QUERY_PARSER_IMPLEMENTATION=legacy
- DB_CONNECTION=mysql
- DB_HOST=db
- DB_PORT=3306
- DB_DATABASE=#DATABASE_NAME
- DB_USERNAME=#USERNAME
- DB_PASSWORD=#PASSWORD
- APP_KEY=#32_CHAR_TOKEN
- APP_URL=https://localhost
ports:
- 8082:8080
depends_on:
- db
db:
image: mariadb:latest
hostname: db
container_name: firefly_iii_mariadb
restart: always
environment:
- PUID=1026
- PGID=101
- MARIADB_ROOT_PASSWORD=#PASSWORD
- TZ="America/Detroit"
- MYSQL_DATABASE=#DATABASE_NAME
- MYSQL_USER=#USERNAME
- MYSQL_PASSWORD=#PASSWORD
- MARIADB_AUTO_UPGRADE=true
volumes:
- /volume1/VSS/FireflyIII/firefly_iii_mariadb:/var/lib/mysql
cron:
#
# To make this work, set STATIC_CRON_TOKEN in your .env file or as an environment variable and replace REPLACEME below
# The STATIC_CRON_TOKEN must be *exactly* 32 characters long
#
image: alpine
restart: always
container_name: firefly_iii_cron
environment:
- PUID=# My admin user ID
- PGID=# Adminuser group ID. I've also used a new user and group ID
- TZ=America/Detroit
- STATIC_CRON_TOKEN=# 32_CHAR_TOKEN
command:
sh -c "apk add tzdata
&& ln -s /usr/share/zoneinfo/${TZ} /etc/localtime
| echo \"0 3 * * * wget -qO- http://app:8080/api/v1/cron/#32_CHAR_TOKEN;echo\"
| crontab -
&& crond -f -L /dev/stdout"
volumes:
firefly_iii_upload:
firefly_iii_mariadb:
Log
2025/07/01 10:39:52 stdout
2025/07/01 10:39:52 stdout at https://mariadb.org/jira
2025/07/01 10:39:52 stdout Please check all of the above before submitting a bug report
2025/07/01 10:39:52 stdout
2025/07/01 10:39:52 stdout the MariaDB discuss email list at https://lists.mariadb.org/postorius/lists/discuss.lists.mariadb.org/
2025/07/01 10:39:52 stdout You can find the latest source at https://downloads.mariadb.org and
2025/07/01 10:39:52 stdout https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
2025/07/01 10:39:52 stdout The latest information about mariadb-install-db is available at
2025/07/01 10:39:52 stdout
2025/07/01 10:39:52 stdout --general-log gives you a log in /var/lib/mysql/ that may be helpful.
2025/07/01 10:39:52 stdout Try '/usr/sbin/mariadbd --help' if you have problems with paths. Using
2025/07/01 10:39:52 stdout
2025/07/01 10:39:52 stdout MariaDB> show tables;
2025/07/01 10:39:52 stdout shell> /usr/bin/mariadb -u root mysql
2025/07/01 10:39:52 stdout
2025/07/01 10:39:52 stdout to connect to the mysql database and look at the grant tables:
2025/07/01 10:39:52 stdout and use the command line tool /usr/bin/mariadb
2025/07/01 10:39:52 stdout
2025/07/01 10:39:52 stdout shell> /usr/sbin/mariadbd --skip-grant-tables --general-log &
2025/07/01 10:39:52 stdout
2025/07/01 10:39:52 stdout You can also try to start the mariadbd daemon with:
2025/07/01 10:39:52 stdout
2025/07/01 10:39:52 stdout shell> /usr/bin/mariadb-install-db --defaults-file=~/.my.cnf
2025/07/01 10:39:52 stdout
2025/07/01 10:39:52 stdout my.cnf files. You can ignore these by doing:
2025/07/01 10:39:52 stdout The problem could be conflicting information in an external
2025/07/01 10:39:52 stdout
2025/07/01 10:39:52 stdout /var/lib/mysql/ for more information.
2025/07/01 10:39:52 stdout Installation of system tables failed! Examine the logs in
2025/07/01 10:39:52 stdout
2025/07/01 10:39:52 stderr 2025-07-01 13:39:52 0 [ERROR] Aborting
2025/07/01 10:39:52 stderr �/usr/sbin/mariadbd: Can't change dir to '/var/lib/mysql/' (Errcode: 13 "Permission denied")
2025/07/01 10:39:52 stderr 2025-07-01 13:39:52 0 [Warning] Can't create test file '/var/lib/mysql/db.lower-test' (Errcode: 13 "Permission denied")
2025/07/01 10:39:52 stdout 2025-07-01 13:39:52-04:00 [Note] [Entrypoint]: Initializing database files
2025/07/01 10:39:52 stdout 2025-07-01 13:39:52-04:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:11.8.2+maria~ubu2404 started.
2025/07/01 10:39:52 stdout 2025-07-01 13:39:52-04:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2025/07/01 10:39:52 stderr "1:name=systemd:/docker/7ced489ce28f9b178cd2d9ce9a69e3195934b385f3a0fea3633647a9196e962b/memory.pressure not writable functionality unavailable to MariaDB
"
2025/07/01 10:39:52 stderr 2:name=synomonitor:/system.slice/pkg-ContainerManager-dockerd.service
2025/07/01 10:39:52 stderr 3:blkio:/docker/7ced489ce28f9b178cd2d9ce9a69e3195934b385f3a0fea3633647a9196e962b
2025/07/01 10:39:52 stderr 4:memory:/docker/7ced489ce28f9b178cd2d9ce9a69e3195934b385f3a0fea3633647a9196e962b
2025/07/01 10:39:52 stderr 5:cpuset:/docker/7ced489ce28f9b178cd2d9ce9a69e3195934b385f3a0fea3633647a9196e962b
2025/07/01 10:39:52 stderr 6:freezer:/docker/7ced489ce28f9b178cd2d9ce9a69e3195934b385f3a0fea3633647a9196e962b
2025/07/01 10:39:52 stderr 7:devices:/docker/7ced489ce28f9b178cd2d9ce9a69e3195934b385f3a0fea3633647a9196e962b
2025/07/01 10:39:52 stderr 8:cpuacct:/docker/7ced489ce28f9b178cd2d9ce9a69e3195934b385f3a0fea3633647a9196e962b
2025/07/01 10:39:52 stderr 2025-07-01 13:39:52-04:00 [Warn] [Entrypoint]: /sys/fs/cgroup/pu:/docker/7ced489ce28f9b178cd2d9ce9a69e3195934b385f3a0fea3633647a9196e962b
2025/07/01 10:39:51 stdout 2025-07-01 13:39:51-04:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:11.8.2+maria~ubu2404 started.
2025/07/01 10:38:49 stdout
Metadata
Metadata
Assignees
Labels
No labels