[debian-mysql] Bug#436468: mysql-server-5.0: Unnecessary chgrp of all DB files on package upgrade
Delian Krustev
krustev at krustev.net
Tue Aug 7 18:14:15 UTC 2007
Package: mysql-server-5.0
Version: 5.0.45-1
Severity: normal
I'm using the group ownership to manage the disk quotas of my users.
The preinst script does the following each time:
find $DATADIR -follow -not -group mysql -print0 2>/dev/null \
| xargs -0 --no-run-if-empty chgrp mysql
This recursive chgrp-ing seems unnecessary to me. IMHO /var/lib/mysql should
be included in the package, and the permissions managed by dpkg. This looks to
me as a legacy quick&dirty fix.
If you decide to leave it anyway, I'd recommend moving the command within the
block that creates the data directory and also removing the "-follow" switch
to find.
Furthermore this comment:
# Since the home directory was created before putting the user into
# the mysql group and moreover we cannot guarantee that the
# permissions were correctly *before* calling this script, we fix them now.
# In case we use NIS and no mysql user is present then this script should
# better fail now than later..
contradicts with the "set +e" seen below:
# The "set +e" is necessary as e.g. a ".journal" of a ext3 partition is
# not chgrp'able (#318435).
set +e
chown mysql:mysql $DATADIR
find $DATADIR -follow -not -group mysql -print0 2>/dev/null \
| xargs -0 --no-run-if-empty chgrp mysql
set -e
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.21-2-amd64 (SMP w/1 CPU core)
Locale: LANG=, LC_CTYPE= (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash
Versions of packages mysql-server-5.0 depends on:
ii adduser 3.104 add and remove users and groups
ii debconf [debconf-2.0] 1.5.14 Debian configuration management sy
ii libc6 2.6-5 GNU C Library: Shared libraries
ii libdbi-perl 1.57-1 Perl5 database interface by Tim Bu
ii libgcc1 1:4.2.1-2 GCC support library
ii libmysqlclient15off 5.0.45-1 MySQL database client library
ii libncurses5 5.6+20070716-1 Shared libraries for terminal hand
ii libreadline5 5.2-3 GNU readline and history libraries
ii libstdc++6 4.2.1-2 The GNU Standard C++ Library v3
ii libwrap0 7.6.dbs-14 Wietse Venema's TCP wrappers libra
ii lsb-base 3.1-24 Linux Standard Base 3.1 init scrip
ii mysql-client-5.0 5.0.45-1 MySQL database client binaries
ii mysql-common 5.0.45-1 MySQL database common files
ii passwd 1:4.0.18.1-11 change and administer password and
ii perl 5.8.8-7 Larry Wall's Practical Extraction
ii psmisc 22.5-1 Utilities that use the proc filesy
ii zlib1g 1:1.2.3.3.dfsg-5 compression library - runtime
Versions of packages mysql-server-5.0 recommends:
pn mailx <none> (no description available)
-- debconf information excluded
--
Delian Krustev
"The mind is a terrible thing to taste."
More information about the pkg-mysql-maint
mailing list