Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Permission denied error when running BIX command line extraction

SA-3552

Summary



User has observed that BIX command line extraction process creates two directories - namely ExtractedFiles and pr_temp - within the OS temporary directory. These directories are created during engine initialization on running the BIX extraction process via command line.
 
The OS user who runs the BIX extraction process for the first time (say User_1) owns the lock on these two directories.  When a second user attempts to use BIX, and execute the Extract Rule, the process fails with a “Permission Denied error”. The first BIX user is able to continue working with the BIX extraction process, without any errors.

Environment is a LINUX implementation.

Error Messages



Oct 30, 2014 5:19:12 AM com.pega.pegarules.internal.bootstrap.PRBootstrap
19830421: Engine classes schema: null
Oct 30, 2014 5:19:12 AM com.pega.pegarules.internal.bootstrap.PRBootstrap
19830421: Assembled classes schema: null
Oct 30, 2014 5:19:12 AM com.pega.pegarules.internal.bootstrap.PRBootstrap
19830421: prbootstrap.properties merged with prbootstrap entries in Data-Admin-System-Settings
Oct 30, 2014 5:19:12 AM com.pega.pegarules.internal.bootstrap.PRMiniLoader
19830421: Will load phase 2 bootstrap from Pega-EngineCode:07-10-13
Oct 30, 2014 5:19:16 AM com.pega.pegarules.internal.bootstrap.phase2.PRBootstrapImpl
19830421: PegaRULES base classes will be loaded from the database
Oct 30, 2014 5:19:16 AM com.pega.pegarules.internal.bootstrap.phase2.PRBootstrapImpl
19830421: PegaRULES signed jar files will be extracted to: /tmp/extractedFiles
Oct 30, 2014 5:19:16 AM com.pega.pegarules.internal.bootstrap.phase2.PRBootstrapImpl
WARNING: Cannot delete file: prneethi-2.0.4.jar
Oct 30, 2014 5:19:16 AM com.pega.pegarules.internal.bootstrap.phase2.PRBootstrapImpl
WARNING: Cannot delete file: praxiom-1.2.10.jar
Oct 30, 2014 5:19:16 AM com.pega.pegarules.internal.bootstrap.phase2.PRBootstrapImpl
WARNING: Cannot delete file: prrampart-module-1.5.1.jar
Oct 30, 2014 5:19:16 AM com.pega.pegarules.internal.bootstrap.phase2.PRBootstrapImpl
WARNING: Cannot delete file: praxis2-1.5.4.jar
Oct 30, 2014 5:19:16 AM com.pega.pegarules.internal.bootstrap.phase2.PRBootstrapImpl
WARNING: Cannot delete file: prrahas-module-1.5.1.jar
Oct 30, 2014 5:19:16 AM com.pega.pegarules.internal.bootstrap.phase2.PRBootstrapImpl
WARNING: Cannot delete file: prhttpcomponents-client-4.1.2.jar
Oct 30, 2014 5:19:16 AM com.pega.pegarules.internal.bootstrap.phase2.PRBootstrapImpl
WARNING: Cannot delete file: prrampart-core-1.5.1.jar
Oct 30, 2014 5:19:16 AM com.pega.pegarules.internal.bootstrap.phase2.PRBootstrapImpl
WARNING: Cannot delete file: prhttpcomponents-core-4.1.3.jar
Oct 30, 2014 5:19:16 AM com.pega.pegarules.internal.bootstrap.phase2.PRBootstrapImpl
WARNING: Cannot delete file: praddressing-1.5.4.jar
Oct 30, 2014 5:19:16 AM com.pega.pegarules.internal.bootstrap.phase2.PRBootstrapImpl
WARNING: Cannot delete directory: apploader
Oct 30, 2014 5:19:16 AM com.pega.pegarules.internal.bootstrap.phase2.PRBootstrapImpl
WARNING: Cannot delete file: activation-1.1.1.jar
Oct 30, 2014 5:19:16 AM com.pega.pegarules.internal.bootstrap.phase2.PRBootstrapImpl
WARNING: Cannot delete file: bcmail-jdk15on-149.jar
Oct 30, 2014 5:19:16 AM com.pega.pegarules.internal.bootstrap.phase2.PRBootstrapImpl
WARNING: Cannot delete file: bcprov-jdk15on-149.jar
Oct 30, 2014 5:19:16 AM com.pega.pegarules.internal.bootstrap.phase2.PRBootstrapImpl
WARNING: Cannot delete file: bcpkix-jdk15on-149.jar
Oct 30, 2014 5:19:16 AM com.pega.pegarules.internal.bootstrap.phase2.PRBootstrapImpl
WARNING: Cannot delete directory: java6
Oct 30, 2014 5:19:16 AM com.pega.pegarules.internal.bootstrap.phase2.PRBootstrapImpl
WARNING: Cannot delete file: mail-1.4.1.jar
Oct 30, 2014 5:19:16 AM com.pega.pegarules.internal.bootstrap.phase2.PRBootstrapImpl
WARNING: Cannot delete directory: baseloader
Oct 30, 2014 5:19:16 AM com.pega.pegarules.internal.bootstrap.phase2.PRBootstrapImpl
WARNING: Cannot delete directory: extractedFiles
Oct 30, 2014 5:19:16 AM com.pega.pegarules.internal.bootstrap.phase2.PRBootstrapImpl
SEVERE: Error initializing PRAppLoader
Throwable occurred: java.io.FileNotFoundException: /tmp/extractedFiles/apploader/praxiom-1.2.10.jar (Permission denied)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:180)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:132)
        at com.pega.pegarules.internal.bootstrap.phase2.PRBootstrapImpl._invokeExtractFile_privact(PRBootstrapImpl.java:1198)
        at com.pega.pegarules.internal.bootstrap.phase2.PRBootstrapImpl._finishInitialization_privact(PRBootstrapImpl.java:619)
        at com.pega.pegarules.internal.bootstrap.phase2.PRBootstrapImpl.finishInitialization(PRBootstrapImpl.java:243)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:600)
        at com.pega.pegarules.internal.bootstrap.PRBootstrap.checkForStartup(PRBootstrap.java:680)
        at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:457)
        at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:509)
        at com.pega.pegarules.pub.PegaRULES.main(PegaRULES.java:85)


Steps to Reproduce



To reproduce this issue, execute the BIX command line extraction process from one OS user.  While the first user is running, attempt to start the BIX rule extraction process as a second OS user.  Observe the error condition.

Root Cause



PRPC creates the directories "pr_temp" and "extractedFiles" with an access level as rwxr-xr-x (0755) in the default OS temporary directory (say /tmp/) when user executes command line BIX extraction. When a second (or more) OS user executes the command line BIX extraction process, the operating system indicates a ‘Permission Denied’ security error.

Resolution



Several different possible solutions were provided to the developer:

1) Explicitly provide access to these new directories using chmod 0777 command in the shell script which launches BIX command line extraction process, like below:

chmod 0777 –R <directory_path>/<directory_name>

2) Modify the shell script to remove these directories after the extraction process has completed.  Example:

rm –rf <directory_path>/<directory_name>

3) Permit all OS users intending to execute the BIX extraction process to have a separate copy of BIX Command Line package (containing config and jar files) with user specific directory mappings configured in the PRPC configuration files (prbootstrap.properties and prconfig.xml).

Following configurations need to be setup in prbootstrap.properties and prconfig.xml files:

prbootstrap.properties:

Location of extractedFiles directory can be configured using following property

com.pega.pegarules.bootstrap.tempdir=<directory_path>/<directory_name>     

prconfig.xml:

Location of the pr_temp directory can be configured using following property

<env name="initialization/explicittempdir" value="<directory_path>/<directory_name>" type="java.lang.String" />

Published January 31, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us