Hi…
I’ve been banging my head against a wall for a while with this one but making very little progress.
In order to increase security I am attempting to run MySQL in a chrooted environment whenever I do so, I get the following error
[Error] Fatal error: Can't change to user 'mysqluser' ; Please check that the user exists!
I am using:-
Opensuse 11
MySQL 5.0.51b (built from source)
I have written a bash script to do the configuring, making, installing and copying to the chroot environment, it also creates the users and copies the passwd, shadow and group files into the chrooted environment and sets permissions. I could post the entire script if that would help.
The chroot environment is at
/func/mysql
I am logged in as root and the command I am using to start the server is
chroot /func/mysql /usr/local/mysql/libexec/mysqld --user=mysqluser
the mysql build was configured with the
--with-mysql-ldflags=-all-static
option so should all be in one great big file (which it seems to be)
My chrooting process is based on one described on this site for FreeBSD Securing MySQL: step-by-step and I’m pretty certain I’ve changed the correct bits.
Any suggestions as to why this is happening and possible fixes would be greatly appreciated.
Do I need to do anything with the passwd, group and shadow files in the chroot environment?
Do I need any other files for these 3 to work?
Could AppArmor be getting in the way? (I’ve uninstalled it but nothing seems to have changed)
Many thanks for any help (my head is getting sore!!!)