From 5672aa5a1d93ab6acbf1f2934650d437720d16c4 Mon Sep 17 00:00:00 2001 From: iadgovuser26 Date: Thu, 14 Mar 2024 14:48:14 -0400 Subject: [PATCH] fixed permission issue with mariadb.log --- package/linux/db/mysql_util.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/linux/db/mysql_util.sh b/package/linux/db/mysql_util.sh index 61367c71..eb214e2c 100755 --- a/package/linux/db/mysql_util.sh +++ b/package/linux/db/mysql_util.sh @@ -62,6 +62,7 @@ start_mysqlsd () { if [ ! -d "/var/lib/mysql/mysql/" ]; then echo "Installing mariadb" | tee -a "$LOG_FILE"; /usr/bin/mysql_install_db >> "$LOG_FILE" + chown -R mysql:mysql /var/log/mariadb/ fi if [[ $PRINT_STATUS == "-p" ]]; then echo "Starting mysql..."; fi /usr/bin/mysqld_safe --skip-syslog >> "$LOG_FILE" & @@ -226,6 +227,7 @@ mysqld_reboot () { if [[ $(pgrep -c $PROCESS) -ne 0 ]]; then pkill $PROCESS fi + chown mysql:mysql /var/log/mariadb/mariadb.log >> "$LOG_FILE"; /usr/bin/mysqld_safe --skip-syslog >> "$LOG_FILE" & sleep 1 check_mysql