summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorBalasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>2016-05-18 17:23:16 +0530
committerBalasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>2016-05-18 17:23:16 +0530
commit8281068f72385fb559906ca14f29bd3871b8830d (patch)
treed440d983e7cafac25253e5113aa259c3bcbbb963 /packaging
parent90b9c957ba6380a717aaef6285b3f1498f4a29dc (diff)
downloadmariadb-git-8281068f72385fb559906ca14f29bd3871b8830d.tar.gz
BUG#21879694 - /VAR/LOG/MYSQLD.LOG HAS INCORRECT PERMISSIONS AFTER INSTALLING SERVER FROM REPO
Description: This issue doesn't effect any default installation of repo rpms if user uses init scripts that are shipped as part of package but will have trouble if user tries to createdb or start server manually. After installing mysql-server from repository(yum,zypper) /var/log/mysqld.log is created with logged in user and group permissions instead of with mysql user and group permissions,due to which while creating database or starting server, it is failing Fix: Updated the user and group permissions of the /var/log/mysqld.log and /var/log/mysql/mysqld.log (for sles) files to mysql.
Diffstat (limited to 'packaging')
-rw-r--r--packaging/rpm-oel/mysql.spec.in3
-rw-r--r--packaging/rpm-sles/mysql.spec.in3
2 files changed, 4 insertions, 2 deletions
diff --git a/packaging/rpm-oel/mysql.spec.in b/packaging/rpm-oel/mysql.spec.in
index 8a020b05ae6..8f92f5b84f3 100644
--- a/packaging/rpm-oel/mysql.spec.in
+++ b/packaging/rpm-oel/mysql.spec.in
@@ -1,4 +1,4 @@
-# Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -629,6 +629,7 @@ rm -r $(readlink var) var
datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n 's/--datadir=//p' | tail -n 1)
/bin/chmod 0755 "$datadir"
/bin/touch /var/log/mysqld.log
+/bin/chown mysql:mysql /var/log/mysqld.log >/dev/null 2>&1 || :
%if 0%{?systemd}
%systemd_post mysqld.service
/sbin/service mysqld enable >/dev/null 2>&1 || :
diff --git a/packaging/rpm-sles/mysql.spec.in b/packaging/rpm-sles/mysql.spec.in
index 91c708a583d..47c40b00e23 100644
--- a/packaging/rpm-sles/mysql.spec.in
+++ b/packaging/rpm-sles/mysql.spec.in
@@ -1,4 +1,4 @@
-# Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -492,6 +492,7 @@ rm -r $(readlink var) var
datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n 's/--datadir=//p' | tail -n 1)
/bin/chmod 0755 "$datadir"
/bin/touch /var/log/mysql/mysqld.log
+/bin/chown mysql:mysql /var/log/mysql/mysqld.log >/dev/null 2>&1 || :
%if 0%{?systemd}
%systemd_post mysqld.service
/sbin/service mysqld enable >/dev/null 2>&1 || :