You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Thomas Zumbrunn <ne...@botany.ch> on 2007/04/11 11:18:22 UTC

jsvc with security manager

Hello list

A couple of weeks ago I asked for advice regarding a problem with jsvc and 
security manager. Unfortunately, I still couldn't figure out how to solve the 
problem. Could anyone point me in the right direction? Thank you.

I run tomcat 5.5.x with jsvc (on Linux) to be able to make it listen on port 
80. This works fine. However, if I try to run it with the security manager, I 
get an error and the daemon doesn't start (see log below).

I'm using the script jsvc-src/native/Tomcat5.sh which ships with the tomcat 
distribution and with the environment variable 
CATALINA_OPTS="-Djava.security.manager -Djava.security.policy==$CATALINA_HOME/conf/catalina.policy" 
to be able to run the security manager.

Best wishes
Thomas Zumbrunn

java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at 
org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:160)
Caused by: java.security.AccessControlException: access denied 
(java.security.SecurityPermission getProperty.package.definition)
        at 
java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
        at 
java.security.AccessController.checkPermission(AccessController.java:427)
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
        at java.security.Security.getProperty(Security.java:724)
        at 
org.apache.catalina.security.SecurityConfig.setSecurityProperty(SecurityConfig.java:116)
        at 
org.apache.catalina.security.SecurityConfig.setPackageDefinition(SecurityConfig.java:105)
        at 
org.apache.catalina.startup.Embedded.setSecurityProtection(Embedded.java:989)
        at org.apache.catalina.startup.Embedded.<init>(Embedded.java:129)
        at org.apache.catalina.startup.Embedded.<init>(Embedded.java:114)
        at org.apache.catalina.startup.Catalina.<init>(Catalina.java:57)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
Method)
        at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at java.lang.Class.newInstance0(Class.java:350)
        at java.lang.Class.newInstance(Class.java:303)
        at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:224)
        at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:280)
        ... 5 more
23/03/2007 16:54:09 30023 jsvc.exec error: Cannot load daemon
23/03/2007 16:54:09 30022 jsvc.exec error: Service exit with a return value of

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: jsvc with security manager

Posted by Rashmi Rubdi <ra...@gmail.com>.
On 4/11/07, Thomas Zumbrunn <ne...@botany.ch> wrote:

Sorry I missed this part:

> I'm using the script jsvc-src/native/Tomcat5.sh which ships with the tomcat
> distribution and with the environment variable
> CATALINA_OPTS="-Djava.security.manager -Djava.security.policy==$CATALINA_HOME/conf/catalina.policy"
> to be able to run the security manager.

I don't know if you've also check the rwx permissions on the relevant files.

-Rashmi

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: jsvc with security manager

Posted by Rashmi Rubdi <ra...@gmail.com>.
On 4/11/07, Thomas Zumbrunn <ne...@botany.ch> wrote:
> Hello list
>
> A couple of weeks ago I asked for advice regarding a problem with jsvc and
> security manager. Unfortunately, I still couldn't figure out how to solve the
> problem. Could anyone point me in the right direction? Thank you.

I don't know if the JSVC mailing list could be appropriate here,
however you're getting...

you may also want to check with the JavaSE Security related forums:
http://forum.java.sun.com/category.jspa?categoryID=15

> Caused by: java.security.AccessControlException: access denied
> (java.security.SecurityPermission getProperty.package.definition)
>         at
> java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)

>From reading a few other related threads:
http://forum.java.sun.com/thread.jspa?threadID=625770&messageID=3590744
it appears that you need to grant security permissions to all the JAR
files used by the JSVC.

-Rashmi

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org