Why is www's $PATH only /usr/bin:/bin?
RW
rwmaillists at googlemail.com
Thu Apr 28 13:06:10 UTC 2016
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"
More information about the freebsd-questions
mailing list