From 59df3ee8291b7f8e43d1889b163309e35adf236a Mon Sep 17 00:00:00 2001 From: Murat Aslan Date: Sat, 29 Nov 2025 13:50:04 +0300 Subject: [PATCH] fix: set correct permissions for custom MySQL/MariaDB config files The custom-config.cnf file was being created with incorrect permissions, preventing the mysql user (uid 999) from reading it. This caused custom MariaDB/MySQL configurations to be silently ignored. The fix adds chmod 644 after creating the config file, matching the standard permissions used for other MySQL config files like mariadb.cnf. Fixes #1697 --- app/Actions/Database/StartMariadb.php | 1 + app/Actions/Database/StartMysql.php | 1 + 2 files changed, 2 insertions(+) diff --git a/app/Actions/Database/StartMariadb.php b/app/Actions/Database/StartMariadb.php index 498ba0b0b..7e2bdd41e 100644 --- a/app/Actions/Database/StartMariadb.php +++ b/app/Actions/Database/StartMariadb.php @@ -288,5 +288,6 @@ class StartMariadb $content = $this->database->mariadb_conf; $content_base64 = base64_encode($content); $this->commands[] = "echo '{$content_base64}' | base64 -d | tee $this->configuration_dir/{$filename} > /dev/null"; + $this->commands[] = "chmod 644 $this->configuration_dir/{$filename}"; } } diff --git a/app/Actions/Database/StartMysql.php b/app/Actions/Database/StartMysql.php index 337516405..fd4973cdf 100644 --- a/app/Actions/Database/StartMysql.php +++ b/app/Actions/Database/StartMysql.php @@ -291,5 +291,6 @@ class StartMysql $content = $this->database->mysql_conf; $content_base64 = base64_encode($content); $this->commands[] = "echo '{$content_base64}' | base64 -d | tee $this->configuration_dir/{$filename} > /dev/null"; + $this->commands[] = "chmod 644 $this->configuration_dir/{$filename}"; } }