[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Proposal] switching user and group id
From: |
Jan-Henrik Haukeland |
Subject: |
Re: [Proposal] switching user and group id |
Date: |
10 Apr 2003 14:11:53 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Civil Service) |
Jani Mikkonen <address@hidden> writes:
> I have accomplished same thing (with tomcat and jboss'es) so that i've
> written a shellscript that setups few environment variables and builds
> up needed jar paths, and calls up the *real* startup script with su so
> that the daemon dont run as root.
Yes and maybe it could be an advantage not to have to use su in shell
scripts. Your mail also gave me another idea; it should be possible to
setup environment variables before a program is started. So, the new
optional syntax in the control file would look something like this:
check XYZ ..
start "/etc/init.d/xyz start" as USER nobody and GROUP nobody
and with ENVIRONMENT {
JAVA_HOME=/usr/local/java
CLASSPATH=/usr/local/libjava/blabla:/opt/jakarta/shared/classes
LD_LIBRARY_PATH=/usr/local/qt/lib:/usr/lib:/usr/local/lib
LD_RUN_PATH=/usr/lib:/usr/local/qt/lib
}
What do you think?
Ps. I can give this a stab next week when a get back from my current
house-building project.
--
Jan-Henrik Haukeland
Re: [Proposal] switching user and group id, Jan-Henrik Haukeland, 2003/04/30