From caaa930eaa1a82a01b58b9c621f29878bdbc2072 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 7 Nov 2022 09:52:13 +0800 Subject: [PATCH] Update index.py --- plugins/mysql-apt/index.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/mysql-apt/index.py b/plugins/mysql-apt/index.py index 8890fc9e6..8eb0f8d16 100755 --- a/plugins/mysql-apt/index.py +++ b/plugins/mysql-apt/index.py @@ -135,10 +135,11 @@ def initDreplace(version=''): if not os.path.exists(mysql_conf_dir): os.mkdir(mysql_conf_dir) - mysql_tmp = getServerDir() + '/tmp' - if not os.path.exists(mysql_tmp): - os.mkdir(mysql_tmp) - mw.execShell("chown -R mysql:mysql " + mysql_tmp) + tmp_dir = getServerDir() + '/tmp' + if not os.path.exists(tmp_dir): + os.mkdir(tmp_dir) + mw.execShell("chown -R mysql:mysql " + tmp_dir) + mw.execShell("chmod 750 " + tmp_dir) mysql_conf = mysql_conf_dir + '/my.cnf' if not os.path.exists(mysql_conf):