EM 13c:Fleet How To Run Fleet Custom Pre/Post Scripts as Root User
(Doc ID 2660926.1)
Last updated on AUGUST 25, 2021
Applies to:
Enterprise Manager for Oracle Database - Version 13.3.1.0.0 and laterInformation in this document applies to any platform.
Symptoms
In Enterprise Manger (EM) Cloud Control, Fleet Custom Pre/Post scripts is not honoring execution with root user. Trying to execute fleet pre/post script using root user will result in following error.
$ emcli list_swlib_entities -show_entity_rev_id -name='Fleet_Custom_Shell_Post'
Fleet_Custom_Shell_Post,0.1,,Ready,Directives,,Untested,SYSMAN,,,oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:8D3A57AF8BA84540E0532669400A5414:0.1
$ ls -ltr
-rw-r-----. 1 oracle oinstall 576 Jul 9 16:00 scriptInputFile.txt
drwxr-----. 2 oracle oinstall 4096 Jul 9 16:02 1562688047797
Log:
------------------------------------------------------------
Input PropertyFilePath is
/tmp/JOB_8D3BED57249C625BE0532669400A5A46/properties
Input directiveScriptFilePath is
/tmp/JOB_8D3BED57249C625BE0532669400A5A46/Fleet_Custom_Shell_Post
Input directiveTypeProperty is NAME_Executor
Input componentPath is Component
Input directivePath is Directive
Input componentFilename is /tmp/JOB_8D3BED57249C625BE0532669400A5A46/null
Directive Type is SUB_Bash
Dir to CD is /tmp/JOB_8D3BED57249C625BE0532669400A5A46
Final command line to execute is /bin/sh
"/tmp/JOB_8D3BED57249C625BE0532669400A5A46/Fleet_Custom_Shell_Post"
- /u04/wd/953770167220190/scriptInputFile.txt¿
The output of the directive is:
!!!!!!!!
/bin/bash
oracle
cat: ¿/u04/wd/953770167220190/scriptInputFile.txt¿
: No such file or directory
!!!!!!!!
------------------------------------------------------------
Changes
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Changes |
Cause |
Solution |
References |