[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: as uid USERNAME and gid GROUPNAME not working
From: |
Kevin Chadwick |
Subject: |
Re: as uid USERNAME and gid GROUPNAME not working |
Date: |
Mon, 21 Feb 2011 18:47:15 +0000 |
On Tue, 22 Feb 2011 18:33:15 +0100
Jan-Henrik Haukeland wrote:
>
> On Feb 22, 2011, at 6:11 PM, forsaleinsf wrote:
>
> > not sure if i missing something else
>
> You are probably missing some environment stuff. As it says in the wiki FAQ
> http://mmonit.com/wiki/Monit/FAQ#execution
>
> For security reasons monit purges the environment and only sets a spartan
> PATH variable that contains /bin, /usr/bin, /sbin and /usr/sbin. If your
> program or script dies, the reason could be that it expects certain
> environment variables or to find certain programs via PATH. If this is the
> case you should set the environment variables you need directly in the start
> or stop script called by monit.
>
Or if your scripts don't need to be portable then being explicit with
the path in your scripts/cmdline is even better. I do that and also tie
down sudo. ;-)