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
This commit is contained in:
Murat Aslan 2025-11-29 13:50:04 +03:00
parent a56fde7f12
commit 59df3ee829
2 changed files with 2 additions and 0 deletions

View file

@ -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}";
}
}

View file

@ -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}";
}
}