Adding Security Permissions

All Tomcat contexts, added by Parallels Pro Control Panel, receive a default set of security permissions. The default security permissions are as follows:

grant codeBase "file:/home/virtual/site<n>/fst/var/www/html/

-" {permission java.net.SocketPermission "*", "connect";};

To add security permissions for a site:

  1. Log on to Parallels Pro Control Panel as the root user.
  2. Change directory to /var/tomcat4/conf/ sites.policies.d/.
  3. In this directory, create the file site<n>.policy.custom.
  4. Add the required security permissions to the file site<n>.policy.custom.
  5. Regenerate the file /var/tomcat4/conf/catalina.policy using the following command.

    m4 /var/tomcat4/conf/catalina.policy.template > /var/tomcat4/conf/catalina.policy

  6. To clear the cache and to enable new changes in /var/tomcat4/work/domainname, type the following commands.

    cd /var/tomcat4/work/

    rm -rf *

  7. To restart Tomcat, type the following command.

    /etc/rc.d/init.d/tomcat4 restart

    When adding security permissions for a site: