On RH EL6 you can run tomcat6 as a user other than the default 'tomcat' by setting TOMCAT_USER in the configuration and making sure that $TOMCAT_USER is in the tomcat group.<br />
<br />
This does not work under CentOS 6 because of file ownership and permissions.<br />
<br />
I see one set of differences is the three chown lines in /etc/init.d/tomcat6 but there must also be another difference in whatever code creates /etc/tomcat6 directory. In RH6 /etc/tomcat6 ends up having owner root and group tomcat. In CentOS 6 version of tomcat6 the directory /etc/tomcat6 has owner tomcat and group root, which means that if $TOMCAT_USER is not tomcat then its membership in the tomcat group does not help it get access.
↧