From owner-freebsd-questions Sun Aug 4 23: 8:43 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D659B37B48E for ; Sun, 4 Aug 2002 23:08:25 -0700 (PDT) Received: from services.webwarrior.net (overlord-host99.dsl.visi.com [209.98.86.99]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D39443E9E for ; Sun, 4 Aug 2002 23:08:07 -0700 (PDT) (envelope-from friar_josh@webwarrior.net) Received: from twincat.vladsempire.net (12-218-27-215.client.mchsi.com [12.218.27.215]) by services.webwarrior.net (Postfix) with ESMTP id 98253838205; Mon, 5 Aug 2002 01:08:05 -0500 (CDT) Date: Fri, 16 Nov 2001 16:17:40 +0000 From: Josh Paetzel To: Anthony Atkielski Cc: Mike Meyer , questions@FreeBSD.ORG Subject: Re: Is root's search path special? Message-ID: <20011116161740.B504@twincat.vladsempire.net> References: <15349.30413.867238.510518@guru.mired.org> <00c601c16eeb$a8607c30$0a00000a@atkielski.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <00c601c16eeb$a8607c30$0a00000a@atkielski.com>; from anthony@atkielski.com on Fri, Nov 16, 2001 at 11:11:29PM +0100 Lines: 46 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Nov 16, 2001 at 11:11:29PM +0100, Anthony Atkielski wrote: > Myprogram was an example, but the real-world case where I found this was with > the text editor joe, which is an executable file. It's in /usr/local/bin, and > /usr/local/bin is in my path, even under root, and yet the shell can't seem to > find it when I am logged in as root, but it finds it when I'm logged in as a > normal user. All the environment variables look pretty much the same, so I was > thinking that there must be something weird about root, but I didn't know where > to look to find out for sure. Given Mike's response, you might tell us which shells the respective accounts are using. Josh > > ----- Original Message ----- > From: "Mike Meyer" > To: "Anthony Atkielski" > Cc: > Sent: Friday, November 16, 2001 21:27 > Subject: Re: Is root's search path special? > > > > Anthony Atkielski types: > > > Why is it that when I try > > > > > > % myprogram > > > > > > it will run under an ordinary user login, but cannot be found under a root > > > login? The program myprogram is in /usr/local/bin, and /usr/local/bin > appears > > > in the PATH for both the user and the root login. Why doesn't it work under > > > root? Is there something special about the way root executes things? > > > > Is myprogram by any chance a script? There's a bug - I claim it's in > > the kernel, but the committers claim that it's in csh - that causes a > > bad interpreter on the "#!" line in a script to cause the program to > > be reported as "not found" by csh. > > > > If it is a script, you might verify that the #! line refers to the > > interpreter by the full path. > > > >