CLOUDSTACK-2758: Fix permissions of catalina.out

Because of CVE 2013-1976, catalina.out gets owned by root. Since
cloudstack-management is run under a privileged user env. of cloud have
cloud ($TOMCAT_USER) own the catalina.out.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
This commit is contained in:
Prasanna Santhanam 2013-06-03 13:53:19 +05:30
parent 723a455731
commit 54127f838e
1 changed files with 8 additions and 0 deletions

View File

@ -36,3 +36,11 @@ done
export CLASSPATH
PATH=/sbin:/usr/sbin:$PATH
export PATH
#catalina.out owned by `cloud` not `root`
if [ ! -f $TOMCAT_LOG ]; then
touch $TOMCAT_LOG
chown $TOMCAT_USER:$TOMCAT_USER $TOMCAT_LOG
else
chown $TOMCAT_USER:$TOMCAT_USER $TOMCAT_LOG
fi