Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've got a number of Tomcat instances setup on my server. It's a single tomcat installation configured with the standard tomcat user and tomcat group. I've setup a number of different CATALINE_BASE instances.

I would like to be able to

  • deploy / undeploy applications (on a file-system level, by removing files in the tomcat/webapps folder.
  • read logfiles that the tomcat instance generates (catalina.out)
  • read logfiles that apps installed on tomcat generated (log4j logfiles).

I've got a user that is in the Tomcat group but most of the files that tomcat generates have the following permissions

I would like to use this user to perform the tasks above, but every single file that is created by Tomcat has the following permissions:

-rw------- 1 tomcat tomcat   4675 Jan 15 16:26 /usr/local/tomcat-instance1/webapps/myapp
-rw------- 1 tomcat tomcat   4675 Jan 15 16:26 /usr/local/tomcat-instance1/logs/catalina.out
-rw------- 1 tomcat tomcat 201774 Jan 15 20:39 /var/log/myapp/myapp.log

So I'm forced to do a su - to read these files.

How can I have a non-root user capable of reading these files ? Can I configure something on the Tomcat level to ensure that it sets different group permission, allowing my non-root user (that is part of the tomcat group) to manipulate these files.

share|improve this question

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.