Endevor ENWSIns.sh: chown fails -EDC5139I Operation not permitted
search cancel

Endevor ENWSIns.sh: chown fails -EDC5139I Operation not permitted

book

Article ID: 368967

calendar_today

Updated On:

Products

Endevor

Issue/Introduction

Install Endevor web services by running ENWSIns.sh under user's own ID and not root, and ENWSIns.sh fails at line

chown -Rh 0:£TOMCAT_GROUP "£ENDEVOR_TOMCAT_INSTANCE"

chown: FSUM6180 file "/path/to/tomcat": EDC5139I Operation not permitted

Environment

Endevor V19

Cause

WSTOMINS JCL has the following setting:

SET RUN@ROOT='NO' 

RUN_AS_ROOT="£RUN@ROOT"  <<£ is a typo 

The typo in above setting is causing RUN_AS_ROOT set to £RUN@ROOT (not YES/NO) in ENWSInstallOptions.properties. 

The logic in ENWSIns.sh step 4 - setting the access permission for the new Tomcat instance depends if the RUN_AS_ROOT is set to YES or NO in in ENWSInstallOptions.properties. 

With the wrong (unknown) RUN_AS_ROOT setting,  and CLEAN_ENDEVOR_TOMCAT_INSTANCE=Y,  ENWSIns.sh step 4 is executed using the following command

chown -Rh 0:$TOMCAT_GROUP "$ENDEVOR_TOMCAT_INSTANCE"

According to IBM chown command:

Only the root user can change the owner of a file. You can change the group of a file only if you are a root user or if you own the file. If you own the file but are not a root user, you can change the group only to a group of which you are a member.

The install script runs under the user ID and not root, regular user don't have the permission to change the owner of a file.

Resolution

Check out the comments in WSTOMINS:

Choose if the install should attempt to switch to UID=0 (root)   
   YES - Use 'su' to execute the install script under UID=0      
         Requires access to BPX.SUPERUSER in FACILITY class      
         Installed files will be owned by TOMCAT_USER defined    
         in step 'PARAMS'                                        
   NO  - Run the install script under the submitter of this job  
         Installed files will be owned by the submitter          

If root is not required to install Endevor web services, update WSTOMINS JCL 

SET RUN@ROOT='NO' 

RUN_AS_ROOT="&RUN@ROOT"   << note here typo £ is corrected by &

The above change will set RUN_AS_ROOT=NO in ENWSInstallOptions.properties. and ENWSIns.sh will skip step 4 (chown command is in step 4)

** Step 4                                                                       
>> Setting access permissions for new Tomcat instance                           
 > Step 4 will be skipped due to the RUN_AS_ROOT parameter being set to NO.     
 > The owner of the new Tomcat instance will therefore remain active user (XXX)
 > and group will remain as owner's default group (XXX).