Determine permissions requirements (Java)

Problem

You need to determine what system permissions you need to install and use the New Relic Java agent.

Solution

The process owner must meet the following permissions requirements for Java:

  1. The owner of the Java process to which the -javaagent option will be passed must have read permissions for the java agent JAR. This is because Java is what is being executed, and Java needs to read the newrelic.jar.
  2. The process owner requires write/execute permissions for the directory in which the log directory will be created and execute permissions for all parent directories of the log directory. This parent directory could be any of the following:
    • The directory in which the newrelic.jar lives. This is the default location in which the New Relic java agent will create its logs directory.
    • The location specified by the log_file_path system property also passed into the JVM
    • StdOut if you have specified this location with the NEW_RELIC_LOG environment variable

    If the New Relic log directory already exists, the process owner must have write/execute access in this directory so the java process can traverse into the directory and create the java agent log file.

  3. The process owner must have write/execute access to the temp directory for the Java process. This may be the default directory for temporary Java files (specified system-wide), or it may be one specific to the process, particularly if you are running an application server as these often specify and configure a discrete temp directory location.

For more help

Recommendations for learning more: