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

Bug 99704

Summary: tomcat-5.0.28-r4 has wrong perms on webapps folder
Product: Gentoo Linux Reporter: David Owen <dsowen>
Component: [OLD] ServerAssignee: Java team <java>
Status: RESOLVED FIXED    
Severity: major CC: luckyduck, spamlover
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description David Owen 2005-07-20 11:19:46 UTC
After emerging tomcat-5.0.28-r4, the directory /var/lib/tomcat-5/default/webapps
is owned by root:root with permissions rwxr-xr-x (not writable by tomcat).  This
directory must be writable by tomcat in order to deploy WAR files from the
manager webapp.

I suggest making the owner tomcat:tomcat with permissions rwxr-x--- ('other' has
no permissions to avoid unauthorized users from reverse engineering webapps to
gain sensitive information).

Reproducible: Always
Steps to Reproduce:
1.  Add 'www-servers/tomcat-5.0.28-r4' to /etc/portage/package.keywords
2.  emerge -av tomcat
3.  ls -l /var/lib/portage/tomcat-5/default

Actual Results:  
total 0
lrwxrwxrwx  1 root root 21 Jul 18 18:51 conf -> /etc/tomcat-5/default
lrwxrwxrwx  1 root root 25 Jul 18 18:51 logs -> /var/log/tomcat-5/default
lrwxrwxrwx  1 root root 25 Jul 18 18:51 temp -> /var/tmp/tomcat-5/default
drwxr-xr-x  2 root root 18 Jul 18 18:51 webapps
lrwxrwxrwx  1 root root 25 Jul 18 18:51 work -> /var/run/tomcat-5/default

Expected Results:  
total 0
lrwxrwxrwx  1 root   root   21 Jul 18 18:51 conf -> /etc/tomcat-5/default
lrwxrwxrwx  1 root   root   25 Jul 18 18:51 logs -> /var/log/tomcat-5/default
lrwxrwxrwx  1 root   root   25 Jul 18 18:51 temp -> /var/tmp/tomcat-5/default
drwxr-x---  2 tomcat tomcat 18 Jul 18 18:51 webapps
lrwxrwxrwx  1 root   root   25 Jul 18 18:51 work -> /var/run/tomcat-5/default
Comment 1 Petteri Räty (RETIRED) gentoo-dev 2005-09-20 11:00:20 UTC
Now fixed in the -r6 ebuild. When upgrading you need to manually change the
permissions because I don't want to force the change if someone has a local
setup. Thanks for reporting.