Public bug reported:

The /var/log/mysql from ubuntu 1604 has now the 755 permission with
mysql:adm. When we set up the slow log query inside the
/var/log/mysql/slow.log, it gets the mysql:mysql user/group instead of
having mysql:adm user/group.

Then, the users inside the adm group cannot check inside the log without
using root privileges.

Are there any reasons why this has been removed in 1604 : chmod 2750
/var/log/mysql ?

In ubuntu 1404:
flebel@opval-ix:~/tmp/debian-5.5_5.5.54-0ubuntu0.14.04.1$ fgrep -R "logdir" *
mysql-server-5.5.postinst:    mysql_logdir=/var/log
mysql-server-5.5.postinst:    mysql_newlogdir=/var/log/mysql
mysql-server-5.5.postinst:        if [ "$dir" = "DATADIR" ]; then 
targetdir=$mysql_statedir; else targetdir=$mysql_newlogdir; fi
mysql-server-5.5.postinst:    if [ ! -d "$mysql_newlogdir"      -a ! -L 
"$mysql_newlogdir"      ]; then mkdir "$mysql_newlogdir"; fi
mysql-server-5.5.postinst:    chown -R mysql:adm $mysql_newlogdir;      chmod 
2750 $mysql_newlogdir;
mysql-server-5.5.postinst:      touch             $mysql_logdir/mysql.$i
mysql-server-5.5.postinst:      chown mysql:adm   $mysql_logdir/mysql.$i
mysql-server-5.5.postinst:      chmod 0640        $mysql_logdir/mysql.$i

root@a649df1b275a:/var/log# ls -ald mysql/ mysql/*
drwxr-s--- 2 mysql adm    4 Jan 19 18:35 mysql/
-rw-rw---- 1 mysql adm 7541 Jan 19 18:35 mysql/error.log
-rw-rw---- 1 mysql adm  182 Jan 19 18:35 mysql/slow.log
root@a649df1b275a:/var/log# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.3 LTS
Release:        14.04
Codename:       trusty

In ubuntu 1604:
flebel@opval-ix:~/tmp/debian-5.7_5.7.17-0ubuntu0.16.04.1$ fgrep -R "logdir" *
mysql-server-5.7.postinst:    mysql_logdir=/var/log/mysql
mysql-server-5.7.postinst:    for d in $mysql_statedir $mysql_filesdir 
$mysql_keyringdir $mysql_logdir
mysql-server-5.7.postinst:    touch $mysql_logdir/error.log
mysql-server-5.7.postinst:    chown -R mysql:adm $mysql_logdir
mysql-server-5.7.postinst:    chmod 0750 $mysql_logdir
mysql-server-5.7.postinst:    chmod 0640 $mysql_logdir/error.log

root@0c341d710c6f:/var/log# ls -ald mysql/ mysql/*
drwxr-x--- 2 mysql adm      4 Jan 19 18:36 mysql/
-rw-r----- 1 mysql adm   4271 Jan 19 18:36 mysql/error.log
-rw-r----- 1 mysql mysql  182 Jan 19 18:36 mysql/slow.log
root@0c341d710c6f:/var/log# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.1 LTS
Release:        16.04
Codename:       xenial

** Affects: mysql-5.7 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1657867

Title:
  chmod 2750 on /var/log/mysql

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1657867/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to