Scheduled Job Running Shell Script Fails With ORA-27369
admin
2023-05-02 15:43:36
0

Scheduled Job Running Shell Script FailsWith ORA-27369

Applies to:

Oracle Server - Enterprise Edition -Version: 10.1.0.2 to 10.2.0.4

Oracle Server - Standard Edition -Version: 10.1.0.2 to 10.2.0.4

including Version:11.2.0.4

Sun Solaris SPARC (64-bit)

Linux x86

"ORA-27369: job of type EXECUTABLEfailed with exit code: Unknown error" was still occurring for non oracle users running DBMS_SCHEDULER executed shellscripts. Problem was fixed when filesystem where ORACLE_HOME was mountedon was found to have been mounted w/ nosetuid. Changing mount option to setuidresolved problem

Symptoms

@Checked for relevance on 16-MAY-2008

A Scheduler job has been configuredusing the DBMS_SCHEDULER package. The job executes a shell script using theoption job_type=>’EXECUTABLE’. The script performs a write operation to anoutput file, for example a redirect operation or touch. The write operationfails with:

ORA-27369: job of type EXECUTABLE failedwith exit code: Operation not permitted

 Or

ORA-27369: job of type EXECUTABLE failedwith exit code: 274662

Or

ORA-27369: job of type EXECUTABLE failedwith exit  code: Unknownerror

Indba_scheduler_job_run_details.additional_info, the following details arerecorded:

ORA-27369: job of type EXECUTABLE failedwith exit code: Operation not permitted

STANDARD_ERROR="touch: cannot touch`’: Permission denied"

Or

ORA-27369: job of type EXECUTABLE failedwith exit code: 274662

STANDARD_ERROR="Oracle Schedulererror: Config file is not owned by root or is

writable by group or other or extjob isnot setuid and owned by root"

Cause

If$ORACLE_HOME/rdbms/admin/externaljob.ora exists then external jobs run as theuser and group specified in this file, which by defaultis a lowly privileged user (nobody).

The user ‘nobody’ andthe group ‘nobody’ do not have the proper privileges for write operations.

As a result, themessage ‘Permission denied’ is returned when attempting to write to files.

Solution

Root access is required for the steps below.

1. Ensure the configuration file$ORACLE_HOME/rdbms/admin/externaljob.ora is owned by root:

# cd$ORACLE_HOME/rdbms/admin/

# chown rootexternaljob.ora

2. Ensure the file permissions arecorrectly set for $ORACLE_HOME/rdbms/admin/externaljob.ora.

Remove write privileges from group andother.

# chmod 640externaljob.ora

# ls -la externaljob.ora

-rw-r—– 1 root oinstall 1537 Sep 1309:24 externaljob.ora

3. Edit$ORACLE_HOME/rdbms/admin/externaljob.ora and set run_user to the OS accountthat owns the Oracle installation and the database and run_group to the OSgroup that owns the Oracle_Home.

Example:

OS account: oracle

OS group: oinstall

run_user = oracle

run_group = oinstall

 4. Ensure the setuid bit is set on the$ORACLE_HOME/bin/extjob executable.  Alsomake sure the filesystem is mounted with setuid option.

# cd$ORACLE_HOME/bin

# chown rootextjob

# chmod 4750extjob

# ls -la extjob

-rwsr-x— 1 root oinstall 64988 Mar 2918:22 extjob


相关内容

热门资讯

国家数据局:支持地方通过“以数... 记者从国家数据局了解到,“数据要素×”城市行活动今天在南京启动,国家层面将支持各地积极挖...
河南多地出现巨大“不明飞行物”... 5月12日晚8点左右,安阳、新乡、焦作……河南多地夜空中出现一团发光“水母云”。这到底是什么东西呢?...
外交部:中方欢迎特朗普总统对中... 5月13日,外交部发言人郭嘉昆主持例行记者会。有记者就美国总统特朗普访华行前的相关言论提问。郭嘉昆表...
外交部质问日本右翼势力:是要打... 外交部:日本重走军国主义的回头路是一条不归路5月13日,外交部发言人郭嘉昆主持例行记者会。有记者问:...
2025年许昌市国民经济和社会... 【大河财立方消息】 5月12日,许昌市统计局、国家统计局许昌调查队发布2025年许昌市国民经济和社会...
我国首条深水油气装备工艺管线智... (来源:中国水运网) 转自:中国水运网 5月10日,海洋石油工程股份有限公司(简称“海油工程”)发布...
成都中科唯实申请一种真空蝶阀专... 国家知识产权局信息显示,成都中科唯实仪器有限责任公司申请一项名为“一种真空蝶阀”的专利,公开号CN1...
华为充电宝怎么样?西圣、图拉斯... 现如今市面上的选择可见是越来越多了,但“踩雷”情况也很常见:有的看起来容量大、实际给手机充电虚标非常...
智己汽车充电地图接入华为超充 ... 【CNMO科技消息】5月13日,智己汽车宣布,华为超充已正式上线其充电地图服务。即日起,智己用户可通...
爆火短剧《enemy》导演否认... 近日,短剧《enemy》凭借震撼人心的台词与浓烈的家国情怀爆火出圈。据钱江视频,5月13日,《ene...