Sorry if this is stupid question but how do you get both of these options 
to work at the same time.

using mysql 4.0.1 on RedHat Linux 7.2

I have:

/etc/passwd
.../jail/etc/passwd

with mysql defined as a user in both.

mysqld will run chroot if user=root or it will run as user=mysql if not chroot.

If I attempt to start it chroot with user=mysql, it fails and claims that 
user mysql does not exist.  The user mysql exists in both passwd files.

Specifically, the problem comes when after doing the chroot, mysqld tries 
to do a getpwnam(user) to find the uid/gid of the user mysql.  Apparently 
it cannot get information from either passwd file.

I copied ls and a couple of libraries into ../jail/lib and a copy of the 
static linked ash shell into .../jail/bin
If I login as root and chroot  .../jail  /bin/sh  I can use ls -l to list 
the files but ls cannot seem to get the passwd information either as the 
user and group fields in the file list just print uid and gid (just numbers).

I have spent several hours looking on the web for answers and the only 
thing I could find is that often when doing this type of thing, programmers 
do the getpwnam and store the result before doing the chroot and then use 
the stored data to complete the change of user.

Has anyone got mysqld to work with both the --user and --chroot options 
without changing the code?

If so, I would appreciate any pointers you could pass along.

Thanks,
Howard 



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to