From 25167dea795c4a1696918e8887e24544bb0c2f66 Mon Sep 17 00:00:00 2001 From: Joe Julian Date: Wed, 7 Sep 2016 09:33:43 -0700 Subject: [PATCH] Set environment temp directory to /tmp Some distros set the environment variable for the temp directory to /tmp/$USER which is owned by $USER mode 700. This prevents the mysql user from being able to access the temporary files it needs. --- mysql/server.sls | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mysql/server.sls b/mysql/server.sls index 8c25dc4..e99699d 100644 --- a/mysql/server.sls +++ b/mysql/server.sls @@ -67,6 +67,8 @@ mysql_install_datadir: - name: mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql - user: root - creates: /var/lib/mysql/mysql/user.frm + - env: + - TMPDIR: '/tmp' - require: - pkg: {{ mysql.server }} - file: mysql_config