On 18.07.2013 21:27, Shridev Makim wrote:
> Hello,
> We are trying to run tomcat7 as a daemon using JSVC in SunOS environment.
> The compiled jsvc executable is owned by root. We have modified daemon.sh
> that bundles with tomcat7 for our environment to run our tomcat instance.
> When we execute this shell script, it creates two processes and both the
> processes are owned by root as shown below (output of ps -ef | grep jsvc):
> 
>     root  9109  9108   2 15:15:03 ?           0:37
> /doc/dmadmin6/product/tomcat7/bin/jsvc -java-home
> /doc/dmadmin6/product/jdk6/jd
>     root  9108     1   0 15:15:03 ?           0:00
> /doc/dmadmin6/product/tomcat7/bin/jsvc -java-home
> /doc/dmadmin6/product/jdk6/jd
> 
> We are running the shell script as a non privileged user (dmadmin6) and we
> are even passing this user name with -user switch to jsvc. We were
> expecting the child process (pid 9109) to be run as a non privileged user
> (dmadmin6) in our case. Anyone else has experienced this?
> 
> Currently in production we have tomcat 6 configured to run with jsvc and in
> that environment we see that the child process is running as a non
> privileged user.
> 
> Thanks in advance for your help!

Might not be related, but: Default shell on Solaris produces two
processes when a command is called via

sh -c "somecommand arg1 arg2"

One process is the shell, the second one the command after "-c". This
differs from Linux where you will only see the second one.

/usr/bin/sh shows the behaviour, /usr/bin/ksh and /usr/xpg4/bin/sh do
not. You could try to run everything with one of those other two shells
to quickly check whether that fixes the problem. You'll have to
experiment a bit, which shell(s) to switch, the one that executes
daemon.sh, the login shell of user dmadmin6 etc.

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to