Bug 203888

Summary: www/tomcat8: temp directory should be owned by www to allow applications to use it
Product: Ports & Packages Reporter: ari.suutari
Component: Individual Port(s)Assignee: Kurt Jaeger <pi>
Status: Closed FIXED    
Severity: Affects Some People CC: pi
Priority: --- Keywords: easy, needs-patch, needs-qa
Version: LatestFlags: bugzilla: maintainer-feedback? (ale)
koobs: merge-quarterly?
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
Patch for pkg-plist none

Description ari.suutari 2015-10-20 10:27:39 UTC
When tomcat8 is installed from ports the temp directory (/usr/local/apache-tomcat-8.0/temp) is owned by root. When web applications attempt to use this directory for temporary work files things go wrong, as tomcat is running as www user.

If directory ownership is changed to www everything works.

Snip from pkg-plist:

%%T%%/lib/websocket-api.jar
%%T%%/temp/safeToDelete.tmp
@dir %%T%%/temp
@owner %%WWWOWN%%
@group %%WWWGRP%%
%%T%%/webapps/ROOT/RELEASE-NOTES.txt
%%T%%/webapps/ROOT/WEB-INF/web.xml

If this is changed to:

%%T%%/lib/websocket-api.jar
%%T%%/temp/safeToDelete.tmp
@owner %%WWWOWN%%
@group %%WWWGRP%%
@dir %%T%%/temp
%%T%%/webapps/ROOT/RELEASE-NOTES.txt
%%T%%/webapps/ROOT/WEB-INF/web.xml

then we would get correct permissions during package install.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2015-10-20 10:35:40 UTC
Thanks for your report Ari.

Can you attach your proposed change to pkg-plist as a unified diff against the port please?

You may use svn diff or diff -u
Comment 2 ari.suutari 2015-10-20 10:54:36 UTC
Created attachment 162233 [details]
Patch for pkg-plist
Comment 3 commit-hook freebsd_committer freebsd_triage 2015-11-07 13:02:40 UTC
A commit references this bug:

Author: pi
Date: Sat Nov  7 13:02:05 UTC 2015
New revision: 400988
URL: https://svnweb.freebsd.org/changeset/ports/400988

Log:
  www/tomcat8: fix user/group of tomcat8 temp dir

  PR:		203888
  Submitted by:	ari.suutari@syncrontech.com
  Approved by:	ale (maintainer timeout)

Changes:
  head/www/tomcat8/Makefile
  head/www/tomcat8/pkg-plist
Comment 4 Kurt Jaeger freebsd_committer freebsd_triage 2015-11-07 13:03:51 UTC
Committed, thanks.