Re: appserver -> root after 10.3.9 upgrade
Re: appserver -> root after 10.3.9 upgrade
- Subject: Re: appserver -> root after 10.3.9 upgrade
- From: Kieran Kelleher <email@hidden>
- Date: Tue, 7 Mar 2006 06:45:45 -0500
Hi Chuck,
Here is that followed by output from a few other relevant command
outputs (which seem to shows the s bit and appserver owner in the right
places .... which is confusing):
XApp:/System/Library/StartupItems/WebObjects admin$ ls -al
total 16
drwxr-xr-x 4 root wheel 136 25 Nov 2003 .
drwxr-xr-x 47 root wheel 1598 3 Mar 08:59 ..
-rw-r--r-- 1 root wheel 272 25 Nov 2003 StartupParameters.plist
-rwxr-xr-x 1 root wheel 2210 8 Dec 2003 WebObjects
XApp:/System/Library/StartupItems/WebObjects admin$ cat WebObjects
#!/bin/zsh
#
# Start and Stop WebObjects Services
#
. /etc/rc.common
WOSERVICE="/System/Library/WebObjects/JavaApplications/wotaskd.woa/
Contents/Resources/javawoservice.sh"
WOTASKD="/System/Library/WebObjects/JavaApplications/wotaskd.woa/
wotaskd"
WOJAVAMONITOR="/System/Library/WebObjects/JavaApplications/
JavaMonitor.woa/JavaMonitor"
GREP=/usr/bin/grep
AWK=/usr/bin/awk
PS=/bin/ps
PRINTSTARTSTOPMESSAGES="YES"
##
# Start WebObjects services
# (Services to be stopped by this script must use
"javawoservice.sh".)
##
StartService ()
{
if [ -x "${WOSERVICE}" ]; then
if [ "${PRINTSTARTSTOPMESSAGES}" = "YES" ]; then
ConsoleMessage "Starting WebObjects services"
fi
if [ -e /var/log/webobjects.log ]; then
mv /var/log/webobjects.log /var/log/webobjects.log.1
fi
####
# OSX Server now has the 'appserver' and 'appserveradm'
for security
# For Panther Server, wotaskd and javawoservice.sh are
owned
# by the appserver user. By launch
"${WOSERVICE}" -appPath "${WOTASKD}"
>/var/log/webobjects.log 2>&1 &
# Uncomment the next line to start Monitor
"${WOSERVICE}" -appPath "${WOJAVAMONITOR}" -WOPort
56789 -WOAutoOpenInBrowser NO >>/var/log/webobjects.log 2>&1 &
####
fi
}
##
# Stop WebObjects Services
# (Stop all services run by "javawoservice.sh".)
##
StopService ()
{
if [ "${PRINTSTARTSTOPMESSAGES}" = "YES" ]; then
ConsoleMessage "Stopping WebObjects services"
fi
WOSERVICEPIDS=`$PS -jaxwwwww | $GREP "$WOSERVICE" | $GREP -v
grep | $AWK '{print $2}'`
parents=""
children=""
for parent in $WOSERVICEPIDS
{
WOSERVICECHILDPIDS=`$PS -jaxwwwww | $AWK 'NF>3 {if ( $3
=='"$parent"' ) print $2}'`
#StopPID $parent
parents="$parents $parent"
for child in $WOSERVICECHILDPIDS
{
#StopPID $child
children="$children $child"
}
}
#kill them all at once
kill $parents $children
}
##
# Restart WebObjects Services
##
RestartService ()
{
ConsoleMessage "Restarting WebObjects services"
PRINTSTARTSTOPMESSAGES="NO"
StopService
StartService
}
##
# Stop Process by PID
##
StopPID ()
{
`kill "$1"`
}
RunService "$1"
------------------------------------------------------------------------
-------------------------------------------------------------
XApp:/System/Library/StartupItems/WebObjects admin$ sudo lsof | grep
^java.*wotaskd\.woa$
java 331 root cwd VDIR 14,3 768 66109
/System/Library/WebObjects/JavaApplications/wotaskd.woa
------------------------------------------------------------------------
-------------------------------------------------------------
XApp:/System/Library/StartupItems/WebObjects admin$ ps -auxwww -p 331
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND
root 331 0.0 -1.8 291180 37384 ?? SN Fri09AM 4:34.07 java
-XX:NewSize=2m -Xmx64m -Xms32m -DWORootDirectory=/System
-DWOLocalRootDirectory= -DWOUserDirectory=/ -DWOEnvClassPath=
-DWOApplicationClass=Application -DWOPlatform=MacOS
-Dcom.webobjects.pid=331 -DWOAllowRapidTurnaround=false -classpath
WOBootstrap.jar com.webobjects._bootstrap.WOBootstrap
------------------------------------------------------------------------
-------------------------------------------------------------
XApp:/System/Library/WebObjects/JavaApplications admin$ ls -al
total 0
drwxr-xr-x 4 root wheel 136 25 Nov 2003 .
drwxr-xr-x 5 root wheel 170 16 Jun 2004 ..
drwxr-xr-x 6 root wheel 204 25 Nov 2003 JavaMonitor.woa
drwxr-xr-x 6 root wheel 204 25 Nov 2003 wotaskd.woa
------------------------------------------------------------------------
-------------------------------------------------------------
XApp:/System/Library/WebObjects/JavaApplications/wotaskd.woa admin$ ls
-al
total 80
drwxr-xr-x 6 root wheel 204 25 Nov 2003 .
drwxr-xr-x 4 root wheel 136 25 Nov 2003 ..
drwxr-xr-x 10 root wheel 340 25 Nov 2003 Contents
-rw-r--r-- 1 root wheel 6464 13 Sep 2003 WOBootstrap.jar
-rwsr-xr-x 1 appserve appserve 11051 13 Sep 2003 wotaskd
-rwxr-xr-x 1 root wheel 16594 13 Sep 2003 wotaskd.cmd
------------------------------------------------------------------------
-------------------------------------------------------------
XApp:/System/Library/WebObjects/JavaApplications/wotaskd.woa/Contents/
Resources admin$ ls -al
total 104
drwxr-xr-x 7 root wheel 238 25 Nov 2003 .
drwxr-xr-x 10 root wheel 340 25 Nov 2003 ..
drwxr-xr-x 3 root wheel 102 25 Nov 2003 Java
-rw-r--r-- 1 root wheel 486 5 Apr 2001 Properties
-rw-r--r-- 1 root wheel 36864 11 Jan 2001 SpawnOfWotaskd.exe
-rwxr-xr-x 1 root wheel 34 11 Jan 2001 SpawnOfWotaskd.sh
-rwsr-xr-x 1 appserve appserve 7984 1 May 2002 javawoservice.sh
On Mar 6, 2006, at 11:15 PM, Chuck Hill wrote:
What is in /System/Library/StartupItems/WebObjects/WebObjects?
On Mar 6, 2006, at 7:34 PM, Kieran Kelleher wrote:
Since I upgraded our WO app server from 10.3.7 to 10.3.9 lsof shows
that wotaskd, and consequently all the WO apps, are being launched as
root instead of appserver.
Checking current permissions on wotasd.woa contents shows wotaskd
itself is owned by appserver as shown here:
XApp:/System/Library/WebObjects/JavaApplications/wotaskd.woa admin$
ls -al
total 80
drwxr-xr-x 6 root wheel 204 25 Nov 2003 .
drwxr-xr-x 4 root wheel 136 25 Nov 2003 ..
drwxr-xr-x 10 root wheel 340 25 Nov 2003 Contents
-rw-r--r-- 1 root wheel 6464 13 Sep 2003 WOBootstrap.jar
-rwsr-xr-x 1 appserve appserve 11051 13 Sep 2003 wotaskd
-rwxr-xr-x 1 root wheel 16594 13 Sep 2003 wotaskd.cmd
How can I get wotaskd to launch as appserver again like it used to
and not root?
Regards, Kieran
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
village.net
This email sent to email@hidden
--
Coming in 2006 - an introduction to web applications using WebObjects
and Xcode http://www.global-village.net/wointro
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden