[Bug 1558471] [NEW] logrotate config mysql-server fails with error "error: skipping "/var/log/mysql.log"

gschoenberger georg at devtux.at
Thu Mar 17 10:10:04 UTC 2016


Public bug reported:

The current logrotate config for mysql server 5.5 fails, therefore logs
are not rotated:

root at lxc:/etc# dpkg -l | grep mysql-server
ii  mysql-server                        5.5.47-0ubuntu0.14.04.1          all          MySQL database server (metapackage depending on the latest version)
ii  mysql-server-5.5                    5.5.47-0ubuntu0.14.04.1          amd64        MySQL database server binaries and system database setup
ii  mysql-server-core-5.5               5.5.47-0ubuntu0.14.04.1          amd64        MySQL database server binaries

root at lxc:~# logrotate -f /etc/logrotate.d/mysql-server 
error: skipping "/var/log/mysql.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.

In order to set up logrotate again, I added (cf. diff attached):
- su root syslog
- notifempty

I added the "notifempty" because in default Ubuntu mysql installations "/var/log/mysql.log" is not used:
root at lxc:/etc# find /etc/mysql/ -type f -print0 | xargs -0 grep -i '/var/log/mysql.log'
root at lxc:/etc# echo $?
123

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


** Tags: logrotate mysql-server

** Patch added: "Patch for logrotate mysql-server config"
   https://bugs.launchpad.net/bugs/1558471/+attachment/4601932/+files/logrotate-mysql-server.diff

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to mysql-5.5 in Ubuntu.
https://bugs.launchpad.net/bugs/1558471

Title:
  logrotate config mysql-server fails with error "error: skipping
  "/var/log/mysql.log"

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



More information about the Ubuntu-server-bugs mailing list