From owner-freebsd-questions@FreeBSD.ORG Sat Aug 18 00:48:14 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A62F16A41A for ; Sat, 18 Aug 2007 00:48:14 +0000 (UTC) (envelope-from fatman.uk@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.170]) by mx1.freebsd.org (Postfix) with ESMTP id 8723113C457 for ; Sat, 18 Aug 2007 00:48:13 +0000 (UTC) (envelope-from fatman.uk@gmail.com) Received: by ug-out-1314.google.com with SMTP id o4so433148uge for ; Fri, 17 Aug 2007 17:48:12 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:user-agent:mime-version:to:subject:content-type:content-transfer-encoding:from; b=pjrXk5MqmMi95IRIqtd2hZCIFPY+1cwcUsnsdwdwQR4TbDMiAMQvG+YvCkzoJ1laa9mvPiMEt8zUo9iTExVreoqkCtdQ1S058Cphb2eMsMeQ4wBrtAiKsC359gWn5xR0iSe4r8C1ZBBvhXUWibsjMgu0vOlpG6JQN4hEgWjPnOU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:user-agent:mime-version:to:subject:content-type:content-transfer-encoding:from; b=HLSnTPtN0XCJH+gLvrCYAL0pFvuXnspeZqs6OGbHim2idiiUMnM338XZYFuIS/1oxhIzb4ypsVThBOqUaQn6RRqQH0LDi7x/Gc5nArwWKlpL3Pu91omUTi0r8XR002mK5u+vN0Vw4VWabHcIVo5NXzK69OO31lvfibDupv5Cxno= Received: by 10.67.87.8 with SMTP id p8mr1137586ugl.1187398091992; Fri, 17 Aug 2007 17:48:11 -0700 (PDT) Received: from monju-bosatsu.dreamtrack.dnsalias.com ( [86.18.88.217]) by mx.google.com with ESMTPS id y37sm5435338iky.2007.08.17.17.48.08 (version=SSLv3 cipher=RC4-MD5); Fri, 17 Aug 2007 17:48:11 -0700 (PDT) Message-ID: <46C641C3.5040504@crackmonkey.us> Date: Sat, 18 Aug 2007 01:48:03 +0100 User-Agent: Thunderbird 2.0.0.0 (X11/20070421) MIME-Version: 1.0 To: FreeBSD Questions Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit From: Adam J Richardson Subject: Problem: Apache chroots but MySQL doesn't X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Aug 2007 00:48:14 -0000 Hi all, I've got an unusual problem with my server. It just restarted after a power cut. Everything came back up apart from MySQL. The server refuses to chroot it. %sudo /uetc/rc.d/mysql-server start Password: [: chroot: unexpected operator Starting mysql. %chroot: /jail/mysql: Operation not permitted The first error is normal. It doesn't seem to cause a problem. It's the 'Operation not permitted' error that bothers me. I've tried a manual chroot: %sudo chroot /jail/mysql /bin/sash Stand-alone shell (version 3.7) > exit % No problem there. The startup script is the one installed by the mysql51-server port, except for the 'command' line which now reads: command="chroot /jail/mysql mysqld_safe" It looks as if the script isn't running as root. It must be though, because when I change the command variable to "chroot /home/`whoami`", it throws an error because /home/root doesn't exist. I don't think the chroot binary itself is a problem as it started Apache just fine. So, I'm out of ideas. Help please? TiA, Adam J Richardson ps. I always forget this bit: %uname -a FreeBSD my.server.com 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 10:40:27 UTC 2007 root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 %