Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 176097

Summary: tomcat user doesn't have permission to traverse /etc/tomcat-6/
Product: Gentoo Linux Reporter: Vincent de Phily <moltonel>
Component: New packagesAssignee: William L. Thomson Jr. (RETIRED) <wltjr>
Status: RESOLVED FIXED    
Severity: major CC: java, moltonel
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Vincent de Phily 2007-04-26 11:18:26 UTC
Upon a fresh install of www-servers/tomcat-6.0.10-r3, the /etc/tomcat-6/ folder has "rwxr-x--- root root" permissions.

In this state, starting tomcat with /etc/init.d/tomcat-6 quickly finishes with "[ok]", but no daemon is running and no logfile contain any valuable info.

I fixed my installation by running "chgrp -R tomcat /etc/tomcat-6".
Comment 1 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2007-04-26 11:30:22 UTC
Looks like regression of bug 175189 which this revbump should have fixed, apparently not as this is a fresh install. wltjr: BTW even migrations from broken versions could be handled if you perform the chmod on live system in pkg_postinst()
Comment 2 Vincent de Phily 2007-04-26 12:28:18 UTC
Actually I realize my install might not have been that fresh : I first installed tomcat-5.5, then removed it (with all emerged dependencies) before emerging tomcat-6.

I hadn't touched the config files in my first install, and they're in a different folder (tomcat-5) AFAIK, so it shouldn't have influenced the tomcat-6 install ?

Anyway, I've just unmerged tomcat-6 (manually deleting config-protedted files) and reemerged it, and this time the owner was set to tomcat:tomcat by the ebuild. Not sure where to go from there.
Comment 3 William L. Thomson Jr. (RETIRED) gentoo-dev 2007-05-15 04:42:22 UTC
Went ahead and added some code to pkg_postinst() to change the owner of that directory recursively on live system. It's a temp hack and will be removed in a revision or two. Hopefully others will have updated by then so once removed problem does not re-appear. Still due to files that were in /etc now being symlinks. Server webapp context files, that must go  into /etc/ for functional reasons, but really reside in /usr/share/tomcat-*/webapps/.

Closing bug as it should be fixed now. Please comment or re-open if problem remains.
Comment 4 Petteri Räty (RETIRED) gentoo-dev 2007-05-15 10:20:02 UTC
(In reply to comment #3)
> Went ahead and added some code to pkg_postinst() to change the owner of that
> directory recursively on live system. It's a temp hack and will be removed in a
> revision or two. 

Please add pkg_postinst message that you are changing the live filesystem.
Comment 5 William L. Thomson Jr. (RETIRED) gentoo-dev 2007-05-15 17:06:26 UTC
pkg_postinst message added