Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Apr 2016 14:06:06 +0100
From:      RW <rwmaillists@googlemail.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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"






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160428140606.246aaeb8>