How to run Rational Test Control Panel under a standard user account

Technote (FAQ)


Question

How do you run IBM Rational Test Control Panel (RTCP) on non-Windows systems as a non-root user?

Cause

You have installed RTCP as the root user and want to run RTCP as a non-privileged user.
This user only has read permissions on the directories and files that RTCP writes to at run-time.

Attempts to start RTCP as this user will fail with "Permission denied" errors.


Answer

For RTCP versions before 8.5.1, Apache Tomcat is included and used as the web server.
For RTCP versions 8.5.1 and newer, IBM WebSphere Liberty is included and used.

Instructions are included here for both.

You have two options:

  • Use existing files and directories by changing their permissions.

    Note that for the Liberty versions this will mean making the RTCP server content writeable by the non-root user.
    For this reason the Use Different Files method is preferred.
  • Use different files and directories that the non-root user owns.

    These instructions assume that you have not previously run RTCP as root.
    If you have already run as root, the workspace files will be created by root and will not be usable by the new user.
    You will need to change the ownership of the workspace before proceeding with the steps.
    See the workspace details in the Use Existing Files section.


NOTES
  • In both cases, stop RTCP before you make any changes.

  • Make the changes under the root user account. The examples use the user ID testuser within the group testgroup.

  • Make backup copies of any files that you modify.

  • See the RTCP Release Notes document for the most up-to-date product information. Work with your local system administrator as there might be preferred locations for directories and user permissions.

  • These procedures will only work if the RTCP TCP port number is greater than 1024. Port numbers lower than this are only available to programs that run as privileged user IDs such as root. The default value is 7819.


A. USE EXISTING FILES ON ALL VERSIONS

  1. Change the existing log folder permissions using the chown command.

    For example: chown -R testuser:testgroup logs


  2. Change the existing temporary file permissions using the chown command.

    For example: chown -R testuser:testgroup /var/rtcp


  3. Change the existing workspace permissions.

    a. Open the file container.server.properties. Its default location is either of the following directories:

    /opt/IBM/RationalTestControlPanel/webapps/RTCP/WEB-INF/classes
    /opt/IBM/RationalTestControlPanel/usr/servers/RTCPServer/apps/RTCP.war/WEB-INF/classes

    Note the value of workingDirectory.


    b. Use the chown command to change the permissions. For example.

    chown -R testuser:testgroup /var/rtcp

  4. Add execute permissions to the Liberty scripts and folders.

    For example:

    chmod a+x /opt/IBM/RationalTestControlPanel/bin/*.sh
    chown -R testuser:testgroup /opt/IBM/RationalTestControlPanel/usr/servers



B. USE DIFFERENT FILES WITH TOMCAT

  1. Navigate to the RTCP installation directory.

    Typically: /opt/IBM/RationalTestControlPanel.


  2. Change the default logging folder.

    a. Edit the file: conf/logging.properties


    b. Replace all occurrences of ${catalina.base}/logs with the chosen log folder. For example: /var/IBM/rtcp/logs


    c. Create the directory and set the ownership to be that of the non-root user ID For example:


    mkdir /var/IBM/rtcp/logs
    chown testuser:testgroup /var/IBM/rtcp/logs



  3. Change the location of the tomcat temporary working files.

    a. Edit the file: conf/server.xml


    b. Locate the <Host> element


    c. Add a new workDir attribute to the host line with the desired working directory.

    For example: /var/IBM/rtcp/work

    The entry will look as follows:


    <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" 
    workDir="/var/IBM/rtcp/work
    ">


    d. Create the directory and set the ownership to be that of the non-root user ID. For example:

    mkdir /var/IBM/rtcp/work
    chown testuser:testgroup /var/IBM/rtcp/work



  4. Change the location of the tomcat catalina.out log file.

    a. Edit file: bin/catalina.sh


    b. Add a line near the top of the file to set the value of CATALINA_OUT. For example:


    CATALINA_OUT=/var/IBM/rtcp/logs/catalina.out


  5. Move the existing workspace files to the new location.

    a. Copy or move the files using cp -pr <old location> <new location>

    For example: cp -pr /var/rtcp /var/IBM/rtcp/work


    b. Change the ownership recursively to be that of the non-root user ID. For example,


    chown -R testuser:testgroup /var/IBM/rtcp/work


  6. Change the configured location for the workspace files.


    a. Navigate to the classes directory within the RTCP installation. Typically:

    /opt/IBM/RationalTestControlPanel/webapps/RTCP/WEB-INF/classes


    b. Edit the following file

    container.server.properties and set the value of workingDirectory.


    For example: workingDirectory=/var/IBM/rtcp/work



C. USE DIFFERENT FILES WITH LIBERTY

  1. Navigate to the RTCP installation directory. Typically:

    /opt/IBM/RationalTestControlPanel.

  2. Create a directory named env.

  3. Create the file server.env in the env directory

  4. Insert the lines:

    WLP_OUTPUT_DIR=<Location of workspace directory>
    LOG_DIR=<location of logs directory>

    For example:

    WLP_OUTPUT_DIR=/home/testuser/rtcp
    LOG_DIR=/home/testuser/rtcp/logs

  5. Create the specified folders.

  6. Copy the file to the usr/servers/RTCPServer directory. Typically:

    /opt/IBM/RationalTestControlPanel/usr/servers/RTCPServer

  7. Add execute permissions to the Liberty scripts.

    For example: chmod a+x /opt/IBM/RationalTestControlPanel/bin/*.sh

Rate this page:

(0 users)Average rating

Document information


More support for:

Rational Test Workbench
Rational Test Control Panel

Software version:

8.0, 8.5, 8.6

Operating system(s):

AIX, Linux, Solaris

Reference #:

1621855

Modified date:

2014-06-27

Translate my page

Machine Translation

Content navigation