This post is also available in:
You reconfigure Oracle Restart after an IP or hostname change, run roothas.pl as root, and get this:
Oracle Clusterware infrastructure error in OCRCONFIG (OS PID 26695): CLSD/ADR initialization failed with return value -1
DIA-49802: missing read, write, or execute permission on specified ADR home directory [/u01/app/oracle/diag/crs/orclnode02/crs/log]
DIA-49801: actual permissions [rwxrwx---], expected minimum permissions [rwxrwxrwx] for effective user [oracle]
DIA-48188: user missing read, write, or exec permission on specified directory
Linux-x86_64 Error: 13: Permission deniedThe script stops. Oracle Restart never comes up. The real issue is directory ownership — not the permission mode.
Root Cause
During Oracle Restart reconfiguration, roothas.pl runs as root. In some scenarios — particularly after a roothas.pl -deconfig followed by reconfiguration — the owner of subdirectories under $ORACLE_BASE/diag/crs/ changes from oracle:oinstall to root:root.
DIA-49802 means the oracle user (which runs the CRS process internally) can’t access the ADR directory. The error message mentioning rwxrwxrwx as the expected minimum can be misleading — running chmod 777 will not fix this and is unnecessary.
💡 The problem is ownership, not permission mode. A
chmod 777doesn’t change the owner and introduces an unnecessary security risk. Don’t do it.
Diagnosis
Before running any fix, confirm the ownership issue is present:
cd $ORACLE_BASE/diag/crs/$(hostname)/crs
ls -laExample output when the problem is present (subdirectories owned by root):
drwxr-x--- 2 root oinstall 4096 Mar 16 04:45 alert
drwxr-x--- 2 root oinstall 4096 Mar 16 04:45 cdump
drwxr-x--- 2 root oinstall 4096 Mar 16 04:45 incident
drwxr-x--- 2 root oinstall 4096 Mar 16 04:45 log
drwxr-x--- 2 root oinstall 4096 Mar 16 04:45 trace
...If root owns these subdirectories, you’re in the right scenario. Proceed with the fix.
Fix
⚠️ Run the commands below as
root. Confirm current ownership withls -labefore proceeding.
cd $ORACLE_BASE/diag/crs/$(hostname)/crs
chown -R oracle:oinstall alert
chown -R oracle:oinstall cdump
chown -R oracle:oinstall incident
chown -R oracle:oinstall incpkg
chown -R oracle:oinstall lck
chown -R oracle:oinstall log
chown -R oracle:oinstall metadata
chown -R oracle:oinstall metadata_dgif
chown -R oracle:oinstall metadata_pv
chown -R oracle:oinstall stage
chown -R oracle:oinstall sweep
chown -R oracle:oinstall trace⚠️ If your environment uses a different primary group for Oracle Grid Infrastructure (e.g.,
asmadmin), replaceoinstallaccordingly. Check with:id oracle
After fixing ownership, rerun roothas.pl:
$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/crs/install/roothas.plExpected output after the fix:
2024/03/16 05:31:32 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2024/03/16 05:32:17 CLSRSC-327: Successfully configured Oracle Restart for a standalone serverValidation
Confirm Oracle Restart came up cleanly:
crsctl status res -tAll resources should show ONLINE.
Quick Reference
ls -la $ORACLE_BASE/diag/crs/$(hostname)/crs
chown -R oracle:oinstall $ORACLE_BASE/diag/crs/$(hostname)/crs/*
$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/crs/install/roothas.pl
crsctl status res -tReferences
- Oracle Documentation: Oracle Restart Administration and Deployment Guide
- Oracle Documentation: ADR — Automatic Diagnostic Repository
