From owner-freebsd-questions@freebsd.org Thu Apr 28 13:06:10 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7E42B1DED9 for ; Thu, 28 Apr 2016 13:06:10 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from mail-wm0-x22e.google.com (mail-wm0-x22e.google.com [IPv6:2a00:1450:400c:c09::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 40B0C1E13 for ; Thu, 28 Apr 2016 13:06:10 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: by mail-wm0-x22e.google.com with SMTP id g17so40391097wme.1 for ; Thu, 28 Apr 2016 06:06:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=qMeAC8UpdvvXK6P9PJ1J1oXdGn6XdY1VG/gpD+99XH4=; b=yUAtiAI/epNOsglc06eIi0WjZGWlP2steZhtwfbpW3bldbpB6VbM3uNbc9FuHtu4iX 8O7YWaNJrugNDVoMBExC/4dAXrV5hQABHgEMQssr5KyxkE4gxy1tF00cenrhie6GMbPo TGh3w8SVXTSN8sI02B8gCY7jrLuFyHqA+xHThBpa84F81WS9pYvRwYshj5RI0eSXUGKh veDWRy6RR+Jr8rLceWVB/N1AV2sxoDK/kE21p9HTTdq8YkbNwmcLJMDaMVF4XQCyqnZm cCd+HZDd4LOsseq5L5+WI2rqRnVyZyqDuYy4UpbEuJvjWX4l8sFdZpRJ4ODFV+PyoXQD h8lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qMeAC8UpdvvXK6P9PJ1J1oXdGn6XdY1VG/gpD+99XH4=; b=kqbTGEIXNSMLXjG5eoWgOWGWQ6/WDRpGxhlWOTk/iTaNISLFDGr5rSVpB7GhumDsM9 8f9ICQpnNz0/qneNEVLa1ZhxE8jh6qedxF1A4gqwvdh77qtU/vERB4ayKcL7K0EKvcVm 1whxDXd9LvPuTLe9jhi06EnDVOFC6VTPk2DwoTDZ7vo80IeinK41n2aR9t0nfbZ/YOZQ mkYdQcuzSlweeprgW/TnM5XKbGmTkjuV40K444TJr9On0i4puuJixneGhpiektbF49av MT81Zadqj87/5vY94ydJsWXpjeydPNfnE1u8k+2q/mozSjnLedN1EcivCZf59kixn8HY j4Kg== X-Gm-Message-State: AOPr4FVbxv9aVDDSrNPQtgkr7QYBUzeEQKPjjujcz+yhUuZAaFuzLNUbmA5CD2QfmDyV5Q== X-Received: by 10.28.227.138 with SMTP id a132mr20783166wmh.35.1461848768797; Thu, 28 Apr 2016 06:06:08 -0700 (PDT) Received: from gumby.homeunix.com ([2.222.64.48]) by smtp.gmail.com with ESMTPSA id jp2sm9615740wjc.16.2016.04.28.06.06.07 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 28 Apr 2016 06:06:07 -0700 (PDT) Date: Thu, 28 Apr 2016 14:06:06 +0100 From: RW To: freebsd-questions@freebsd.org Subject: Re: Why is www's $PATH only /usr/bin:/bin? Message-ID: <20160428140606.246aaeb8@gumby.homeunix.com> In-Reply-To: <20160427133304.319a997b@gumby.homeunix.com> References: <20160426194048.GA31481@box-fra-01.niklaas.eu> <20160427120704.GA77440@becker.bs.l> <20160427133304.319a997b@gumby.homeunix.com> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.29; amd64-portbld-freebsd10.2) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Apr 2016 13:06:10 -0000 On Wed, 27 Apr 2016 13:33:04 +0100 RW wrote: > On Wed, 27 Apr 2016 14:07:04 +0200 > Bertram Scharpf wrote: > > > > I wondered as well about this behaviour sometimes. The > > default path from login.conf will be set at login. Yet, the > > www daemon is started from rc and this is not understood to > > be a login. The perverse thing is that when you do a > > "/usr/local/etc/rc.d/apache24 restart" from the command > > line, then the PATH variable will contain the value you > > expect. > > Avoiding that is one of the reasons why service(8) exists. I forget to mention that you can set environmental variables in rc.conf, e.g. apache24_env="FOO=YES PATH=/bin:/usr/sbin:/usr/bin"