Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed my Tomcat as root user in Linux for testing purpose and It's working fine. I would like to change the user for security purpose, So that owner of log files and other files will be created with new user. How can I do this. Please help me.


share|improve this question
up vote 2 down vote accepted

Tomcat normally running as Root. For security reasons, it is always best to run services with the only those privileges that are necessary. Here i have mentioned only for the tomcat installation from the source file

You can do modify the tomcat owner from root as follow

  1. Create the group and user for tomcat.
  2. Change ownership of the tomcat installation files recursive to the user you have created.
share|improve this answer
Can you please help me how to change ownership of the tomcat installation files to user for tomcat? – Selvakumar P Mar 8 '12 at 8:35
Thanks Got it !!! – Selvakumar P Mar 8 '12 at 9:03

I know this is an old post but I just ran across it looking for the same thing and I don't think the answer is exactly right. This is what I found, change /etc/rc.d/init.d/tomcat7:

# from this:

# to this:
su -c "/apps/apache-tomcat-7.0.37/bin/ start" tomcat
share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.