search cancel

Endevor WSTOMCCS job gets error "Script was NOT run under root"


Article ID: 240068


Updated On:


Endevor Software Change Manager (SCM)


Running job WSTOMCCS to deploy or update Endevor Web Services to the Apache Tomcat instance that has to host them.
The job fails with error messages about not running as root:
 ÝINFO~ Parameters are loaded from:
 uid=1340820(LD40820) gid=11007(GBSY00) groups=300(AOPADMIN),4056(UMZSMQ),4057(UMZSOD),4086(UMZAMQ),11004(GBMQ00)
 §§ Script was NOT run under root (uid=0) and the RUN_AS_ROOT is set to YES.
 §§ Please switch to root (command su), or change RUN_AS_ROOT to NO and run the script again.
 Fri Apr 15 15:30:58 CEST 2022
 ÝINFO~ Log saved in:
                         **** Installation FAILED ****


This error may arise when the parameter file used by the job specifies RUN_AS_ROOT=YES. In this case, the script executed by the job checks whether it is running under root by parsing the output of 'id' command, which is also echoed to the output.

When 'id' command returns any UID other than uid=0, the error arises and the script fails.


Release : 18.0

Component : Endevor Software Change Manager


As the message text explains, the script needs to be run by root. If it is not run by root, then parameter RUN_AS_ROOT must be set to NO.

If the deployment is done from the Unix shell, in order to run the script as root, it is enough to issue 'su' command before running the deployment script ( or

If the development is done in batch by job WSTOMCCS, then step EXPAND needs to be coded as

//*         Run the script                                            * 
// PARM='SH su'

The reason is that, when 'su' is issued from BPXBATCH, the command(s) to be executed by 'su'  need to be read from standard input. This is what happens in the above example as BPXBATCH executes  the 'su' command specified in the JCL PARM, which sets the userid to root and then reads and executes the script found in STDIN DD

This behavior is documented in the 'usage notes' of the  IBM description of the 'su' command