Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I copy catalina.sh to /etc/init.d/tomcat and sudo chkconfig --add tomcat it started as root user,I want use another user,how?

share|improve this question

migrated from stackoverflow.com Aug 10 '11 at 5:54

This question came from our site for professional and enthusiast programmers.

2 Answers 2

If you do want to create your own start up script for whatever reason. Then to run tomcat under another user use su -c "$TOMCAT_HOME/bin/tomcat.sh start" nobody when starting tomcat. (nobody is the user in this case that tomcat will start under)

http://www.jguru.com/faq/view.jsp?EID=455567

share|improve this answer

You should not copy catalina.sh to /etc/init.d/tomcat. Ubuntu provides (in its tomcat6 package) a /etc/init.d/tomcat6 startup script that will invoke catalina.sh as the correct user.

Also, using chkconfig on Ubuntu is not supported; it's a script for Red Hat-based systems. Don't use it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.