Comment 7 for bug 382727

Revision history for this message
pascal (pascal-coullet) wrote : Re: [Bug 382727] Re: package mysql-server-5.0 5.1.30really5.0.75-0ubuntu10.2 failed to install/upgrade: le sous-processus post-installation script a retourn? une erreur de sortie d'?tat 1

kern.log after an update:

Jun 6 14:09:34 pascal-laptop kernel: [ 2778.336042] CE: hpet increasing
min_delta_ns to 15000 nsec
Jun 6 14:12:27 pascal-laptop kernel: [ 2951.365529] type=1505
audit(1244290347.985:12): operation="profile_replace"
name="/usr/share/gdm/guest-session/Xsession" name2="default" pid=6760
Jun 6 14:12:28 pascal-laptop kernel: [ 2951.437593] type=1505
audit(1244290348.057:13): operation="profile_replace"
name="/sbin/dhclient-script" name2="default" pid=6764
Jun 6 14:12:28 pascal-laptop kernel: [ 2951.437900] type=1505
audit(1244290348.057:14): operation="profile_replace"
name="/sbin/dhclient3" name2="default" pid=6764
Jun 6 14:12:28 pascal-laptop kernel: [ 2951.437962] type=1505
audit(1244290348.057:15): operation="profile_replace"
name="/usr/lib/NetworkManager/nm-dhcp-client.action" name2="default"
pid=6764
Jun 6 14:12:28 pascal-laptop kernel: [ 2951.438019] type=1505
audit(1244290348.057:16): operation="profile_replace"
name="/usr/lib/connman/scripts/dhclient-script" name2="default" pid=6764
Jun 6 14:12:28 pascal-laptop kernel: [ 2951.625141] type=1505
audit(1244290348.245:17): operation="profile_replace"
name="/usr/lib/cups/backend/cups-pdf" name2="default" pid=6769
Jun 6 14:12:28 pascal-laptop kernel: [ 2951.625518] type=1505
audit(1244290348.245:18): operation="profile_replace"
name="/usr/sbin/cupsd" name2="default" pid=6769
Jun 6 14:12:28 pascal-laptop kernel: [ 2951.673473] type=1505
audit(1244290348.293:19): operation="profile_replace"
name="/usr/sbin/mysqld" name2="default" pid=6774
Jun 6 14:12:28 pascal-laptop kernel: [ 2951.715329] type=1505
audit(1244290348.333:20): operation="profile_replace"
name="/usr/sbin/mysqld" name2="default" pid=6781
Jun 6 14:12:45 pascal-laptop kernel: [ 2969.356181] __ratelimit: 12
callbacks suppressed
Jun 6 14:12:45 pascal-laptop kernel: [ 2969.356185] type=1503
audit(1244290365.974:25): operation="inode_create" requested_mask="a::"
denied_mask="a::" fsuid=0 name="/home/mysql/pascal-laptop.lower-test"
pid=7176 profile="/usr/sbin/mysqld"
Jun 6 14:12:45 pascal-laptop kernel: [ 2969.356259] type=1503
audit(1244290365.974:26): operation="inode_create" requested_mask="a::"
denied_mask="a::" fsuid=0 name="/home/mysql/pascal-laptop.lower-test"
pid=7176 profile="/usr/sbin/mysqld"
Jun 6 14:12:45 pascal-laptop kernel: [ 2969.363748] type=1503
audit(1244290365.982:27): operation="inode_permission"
requested_mask="r::" denied_mask="r::" fsuid=112
name="/home/mysql/mysql/db.frm" pid=7179 profile="/usr/sbin/mysqld"
Jun 6 14:12:46 pascal-laptop kernel: [ 2969.403433] type=1503
audit(1244290366.022:28): operation="inode_create" requested_mask="a::"
denied_mask="a::" fsuid=0 name="/home/mysql/pascal-laptop.lower-test"
pid=7191 profile="/usr/sbin/mysqld"
Jun 6 14:12:46 pascal-laptop kernel: [ 2969.403508] type=1503
audit(1244290366.022:29): operation="inode_create" requested_mask="a::"
denied_mask="a::" fsuid=0 name="/home/mysql/pascal-laptop.lower-test"
pid=7191 profile="/usr/sbin/mysqld"
Jun 6 14:12:46 pascal-laptop kernel: [ 2969.407872] type=1503
audit(1244290366.026:30): operation="inode_permission"
requested_mask="r::" denied_mask="r::" fsuid=112
name="/home/mysql/mysql/user.frm" pid=7195 profile="/usr/sbin/mysqld"
Jun 6 14:12:46 pascal-laptop kernel: [ 2969.407921] type=1503
audit(1244290366.026:31): operation="inode_permission"
requested_mask="r::" denied_mask="r::" fsuid=112
name="/home/mysql/mysql/user.frm" pid=7195 profile="/usr/sbin/mysqld"
Jun 6 14:12:46 pascal-laptop kernel: [ 2969.408101] type=1503
audit(1244290366.026:32): operation="inode_permission"
requested_mask="r::" denied_mask="r::" fsuid=112
name="/home/mysql/mysql/user.frm" pid=7195 profile="/usr/sbin/mysqld"
Jun 6 14:12:46 pascal-laptop kernel: [ 2969.437078] type=1503
audit(1244290366.058:33): operation="inode_create" requested_mask="a::"
denied_mask="a::" fsuid=0 name="/home/mysql/pascal-laptop.lower-test"
pid=7202 profile="/usr/sbin/mysqld"
Jun 6 14:12:46 pascal-laptop kernel: [ 2969.437463] type=1503
audit(1244290366.058:34): operation="inode_create" requested_mask="a::"
denied_mask="a::" fsuid=0 name="/home/mysql/pascal-laptop.lower-test"
pid=7202 profile="/usr/sbin/mysqld"

/etc/apparmor.d/usr.sbin.mysqld:

# vim:syntax=apparmor
# Last Modified: Tue Jun 19 17:37:30 2007
#include <tunables/global>

/usr/sbin/mysqld {
  #include <abstractions/base>
  #include <abstractions/nameservice>
  #include <abstractions/user-tmp>
  #include <abstractions/mysql>
  #include <abstractions/winbind>

  capability dac_override,
  capability sys_resource,
  capability setgid,
  capability setuid,

  network tcp,

  /etc/hosts.allow r,
  /etc/hosts.deny r,

  /etc/mysql/*.pem r,
  /etc/mysql/conf.d/ r,
  /etc/mysql/conf.d/* r,
  /etc/mysql/my.cnf r,
  /usr/sbin/mysqld mr,
  /usr/share/mysql/** r,
  /var/log/mysql.log rw,
  /var/log/mysql.err rw,
  /home/mysql/ r,
  /home/mysql/** rwk,
  /var/log/mysql/ r,
  /var/log/mysql/* rw,
  /var/run/mysqld/mysqld.pid w,
  /var/run/mysqld/mysqld.sock w,
}

I try to uninstall/reinstall, but it's the same thing

Thanks

Mathias Gug a écrit :
> On Fri, Jun 05, 2009 at 10:22:24PM -0000, pascal wrote:
>
>>>> Jun 5 15:31:41 pascal-laptop mysqld[15676]: 090605 15:31:41 InnoDB:
>>>> Operating system error number 13 in a file operation.
>>>> Jun 5 15:31:41 pascal-laptop mysqld[15676]: InnoDB: The error means
>>>> mysqld does not have the access rights to
>>>> Jun 5 15:31:41 pascal-laptop mysqld[15676]: InnoDB: the directory.
>>>>
>>>>
>>> Why is mysql trying to use /home/mysql/ as its data directory
>>>
>>> Is /var/lib/mysql/ a symlink to /home/mysql/ ?
>>>
>>>
>> Not a symlink, but a datadir setting in my.cnf
>>
>>> This is a non-default setup and thus mysqld apparmor profile needs to be
>>> updated to account for this custom configuration.
>>>
>>>
>>>
>> Apparmor is updated and ok
>>
>> All is good before the update.
>>
>
> Could you post the mysqld apparmor profile (found in /etc/apparmor.d/)?
> Could you check if there are audit messages related to apparmor and
> mysqld in /var/log/kern.log?
>
>
>