Bug 203888 - www/tomcat8: temp directory should be owned by www to allow applications to use it
Summary: www/tomcat8: temp directory should be owned by www to allow applications to u...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Kurt Jaeger
URL:
Keywords: easy, needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2015-10-20 10:27 UTC by ari.suutari
Modified: 2015-11-07 13:03 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (ale)
koobs: merge-quarterly?


Attachments
Patch for pkg-plist (454 bytes, patch)
2015-10-20 10:54 UTC, ari.suutari
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.