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

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)


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


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