3.1.12 Secure the R Runtime Path (R_PATH)

Warning! Audit Deprecated

This audit has been deprecated and will be removed in a future update.

View Next Audit Version

Information

The R_PATH parameter contains the directory under which the R runtime is installed. The R runtime is used for running R stored procedures and user-defined functions. It is recommended that the owner of this directory is bin on Linux and AIX, and a member of the Db2 administration group on Windows. The directory should have read and execute permission for all users, but only write permission for the owner.

Rationale:

Restricting access to the R runtime will help ensure that only an authorized runtime is used for running R routines within Db2.

Solution

For Windows and Linux:

Attach to the Db2 instance.

db2 => attach to <db2instance>

Run the following command to change the R path, if necessary:

db2 => update database manager configuration using
r_path <valid directory>

Additional steps for Windows:

Connect to the Db2 host

Right-click over the directory used as the R path

Choose Properties

Select the Security tab

Assign ownership of the directory to the Db2 Administrator

Grant all Db2 administrator accounts the Full Control authority

Grant only read and execute privileges to all other users (revoke all other privileges)

Additional steps for Linux:

Connect to the Db2 host as root

Change to the directory used as the R path

Assign bin to be the owner of the directory using the chown command

Change the permissions for the directory

$ chmod -R 755

See Also

https://workbench.cisecurity.org/files/4033