[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Error: the executable does not exist 'su'
From: |
Jan-Henrik Haukeland |
Subject: |
Re: Error: the executable does not exist 'su' |
Date: |
Tue, 15 Aug 2006 21:35:15 +0200 |
On 15. aug. 2006, at 20.29, Anoop kumar V wrote:
# ./monit status
/etc/monitrc:21: Error: the executable does not exist 'su'
...
You need to specify the full path to the su command. Monit sets a
very spartan path variable which may not contain this command.
check host Remediation_Test with address amp.twoliter.com
group www
start program = "su - weblogic -c /opt/bea/user_projects/
domains/cap2test/start"
Write instead (assuming su is in /usr/bin):
start program = "/usr/bin/su - weblogic -c /opt/bea/
user_projects/domains/cap2test/start"
On a side note, monit also support user id and group id switch upon
starting a program, if you run monit as root. That is you could also
write the above as
start program = "/opt/bea/user_projects/domains/cap2test/
start" as uid weblogic and gid weblogic
See also the tomcat config example here, http://www.tildeslash.com/
monit/doc/manual.php#configuration_examples
Monit will then run the server as the weblogic user.
start program = "cd /opt/bea/user_projects/domains/cap2dev;
su weblogic -c \"nohup
The start/stop command only takes a program with arguments. You
cannot run a script directly. If you want to run a script you must
start a shell like so
start program = "/bin/bash -c 'cd /opt/bea/user_projects/
domains/cap2dev; su weblogic -c ..'
What I am trying to do is this:
Run some processes as another user (weblogic). So for that I use
"su weblogic"
--
Jan-Henrik Haukeland