Specifications
Policy File Creation and Management
The user policy file starts with `.` and is by default at:
<USER.HOME>\.java.policy
Note: USER.HOME refers to the value of the system property named "user.home", which specifies
the user's home directory. For example, the home directory on a Windows NT workstation for a user
named Paul might be "paul.000".
For Windows systems, the user.home property value defaults to
C:\WINNT\Profiles\<USER> (on multi-user Windows NT systems)
C:\WINDOWS\Profiles\<USER> (on multi-user Windows 95/98 systems)
C:\WINDOWS (on single-user Windows 95/98 systems)
The LifeKeeper GUI policy file is by default at:
/opt/LifeKeeper/htdoc/java.policy (Linux)
Policy File Creation and Management
By default, the LifeKeeper GUI policy file is used when the LifeKeeper GUI is invoked as an
application. If you are running the LifeKeeper GUI as an applet, you will need to create a user policy
file in your home directory if one does not already exist. The user policy file should specify the
minimum permissions required to run the LifeKeeper GUI, which are provided in the "Sample Policy
File" section later in this topic.
A policy file can be created and maintained via a simple text editor, or via the graphical Policy Tool
utility included with the Java Runtime Environment (JRE) or Java Development Kit (JDK). Using the
Policy Tool saves typing and eliminates the need for you to know the required syntax of policy files.
For information about using the Policy Tool, see the Policy Tool documentation at
http://docs.oracle.com/javase/6/docs/technotes/tools/.
The simplest way to create a user policy file with the minimum permissions required to run the
LifeKeeper GUI is to copy the LifeKeeper GUI policy file located in
/opt/LifeKeeper/htdoc/java.policy to your home directory and rename it .java.policy (note the
leading dot before the filename which is required). On a Windows system, you can copy the
LifeKeeper GUI policy file by opening the file http://<server name>:81/java.policy (where <server
name> is the host name of a LifeKeeper server) and saving it as .java.policy in your home directory. If
you need to determine the correct location for a user policy file, enable the Java Console using the
Java Control Panel and start the LifeKeeper GUI as an applet. The home directory path for the user
policy file will be displayed in the Java Console.
Granting Permissions in Policy Files
A permission represents access to a system resource. In order for a resource access to be allowed
for an applet, the corresponding permission must be explicitly granted to the code attempting the
access. A permission typically has a name (referred to as a "target name") and, in some cases, a
comma-separated list of one or more actions. For example, the following code creates a
FilePermission object representing read access to the file named abc in the /tmp directory:
SteelEye Protection Suite for Linux163