Red Hat Bugzilla – Bug 118984
/var/lib/tomcat directory permissions (root:root) don't allow user-supplied .war files to be unpacked
Last modified: 2007-04-18 13:04:32 EDT
Description of problem:
/var/lib/tomcat (/usr/share/tomcat/webapps link) has owner root:root,
permissions 755 after installation (from up2date). When a vendor
supplied .war is put into this directory, it should be unpacked at
startup but user tomcat doesn't have permissions to write to this
directory and the extraction fails (the error logs complain about
missing class file which is contained within the .war file).
Version-Release number of selected component (if applicable):
RHEL3, RHAPS 2.95, tomcat 4.1.27-8
Putting custom .war file into tomcat directory, starting tomcat.
Vendor application is not installed/available from tomcat.
Steps to Reproduce:
1. Install tomcat
2. Install vendor .war file to /usr/share/tomcat, owner
tomcat:tomcat, permissions 444
3. Start tomcat
Error unpacking .war file (complains about missing class file, but
the entire contents of .war file are not extracted to the webapps
directory, i.e. webapps/media.war should be unpacked to directory
Unpacked .war file, deployed application
Changing owner (or permissions, really) on /var/lib/tomcat to
tomcat:tomcat allows the application to unpack and deploy properly.
Other tomcat directories (work, logs, etc) are all owned by
tomcat:tomcat -- should /var/lib/tomcat be the same?
Read the bit about ENSURE_WEBAPPS_WRITABLE in /etc/sysconfig/tomcat.