From e3fcb14efcab9aa38754229c14c1cceb4da86c65 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 7 Nov 2022 19:34:09 +0800 Subject: [PATCH] up --- plugins/mariadb/index.py | 4 ++++ plugins/mysql-apt/index.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/mariadb/index.py b/plugins/mariadb/index.py index 2777a1fbe..93c457172 100755 --- a/plugins/mariadb/index.py +++ b/plugins/mariadb/index.py @@ -335,6 +335,10 @@ def initMysqlData(): data = mw.execShell(cmd) # print(data[0]) # print(data[1]) + + if not mw.isAppleSystem(): + mw.execShell('chown -R mysql:mysql ' + serverdir + '/data') + mw.execShell('chmod -R 755 ' + serverdir + '/data') return False return True diff --git a/plugins/mysql-apt/index.py b/plugins/mysql-apt/index.py index dad39ae3e..8b77ba3ed 100755 --- a/plugins/mysql-apt/index.py +++ b/plugins/mysql-apt/index.py @@ -281,7 +281,7 @@ def initMysql57Data(): if not mw.isAppleSystem(): mw.execShell('chown -R mysql:mysql ' + datadir) - mw.execShell('chmod 755 ' + datadir) + mw.execShell('chmod -R 755 ' + datadir) return False return True