/etc/tomcat6 is created with the wrong permissions

Bug #624739 reported by Yves Glodt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tomcat6 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: tomcat6

This is on Ubuntu 10.04/amd64.

The folder /etc/tomcat6 must be writable by tomcat, since it (at least on my setup) wants to create folders there for the configured services and engines, e.g. in my case /etc/tomcat6/opencms/localhost.

The problem is that the folder is owned by root.root, whereas it should be tomcat6.root.

Here an excerpt of my config:

<Service name="opencms">
...
<Engine name="opencms" defaultHost="localhost" debug="99" jvmRoute="ubuntu2">
    <Host name="localhost" debug="99" appBase="/home/tomcat/opencms" unpackWARs="true" autoDeploy="true" />
</Engine>
...
</Service>

Let me know if you need more details.

Revision history for this message
Thierry Carrez (ttx) wrote :

/etc/tomcat6 is only root-writeable by default for security reasons, so that an abuse of the tomcat6 user cannot compromise the whole Tomcat configuration (server.xml, and the users password file). Tomcat6 can write under /etc/tomcat/Catalina/localhost so that autodeployment works.

Your requirement that the tomcat6 user can write in /etc/tomcat6/opencms doesn't come from Tomcat but from OpenCMS. You can change the default protection to suit your particular needs, or use a private instance for OpenCMS (see about tomcat6-user in http://doc.ubuntu.com/ubuntu/serverguide/C/tomcat.html)

Changed in tomcat6 (Ubuntu):
status: New → Invalid
Revision history for this message
Yves Glodt (yglodt) wrote :

Hi,

thanks for your explanation.

I have the same problem actually on other hosts not running OpenCms.

I suspect there must be something fishy in my service/engine/host configuration (It should be changed to write to /etc/tomcat/Catalina/ as you suggested for auto-deployment)

Best regards!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.