Tuesday, June 26, 2012

ORA-27303: additional information: startup egid = 501 (oinstall), current egid = 506 (asmadmin)

Following error message was seen trying to start the cluster database.
srvctl start database -d clusdb
PRCR-1079 : Failed to start resource ora.clusdb.db
CRS-5017: The resource action "ora.clusdb.db start" encountered the following error:
ORA-01078: failure in processing system parameters
ORA-01565: error in identifying file '+DATA/clusdb/spfileclusdb.ora'
ORA-17503: ksfdopn:2 Failed to open file +DATA/clusdb/spfileclusdb.ora
ORA-27140: attach to post/wait facility failed
ORA-27300: OS system dependent operation:invalid_egid failed with status: 1
ORA-27301: OS failure message: Operation not permitted
ORA-27302: failure occurred at: skgpwinit6
ORA-27303: additional information: startup egid = 501 (oinstall), current egid = 506 (asmadmin)
Looking at the oracle binary permission showed
cd $ORACLE_HOME/bin
ls -l oracle
-rwxr-s--x 1 oracle asmadmin 232437369 Apr 30 14:01 oracle

cd $GI_HOME/bin
ls -l oracle
-rwxr-x--x 1 oracle oinstall 204010819 Apr 30 13:57 oracle
The correct permissions of these files are
cd $ORACLE_HOME/bin
ls -l oracle
-rwsr-s--x. 1 oracle asmadmin 220009315 Jun 12 16:59 oracle

cd $GI_HOME/bin
ls -l oracle
-rwsr-s--x. 1 grid oinstall 204009973 Jun 12 14:14 oracle
If role separation is not used
cd $GI_HOME/bin
ls -l oracle
-rwsr-s--x 1 oracle oinstall 204010819 Apr 30 13:57 oracle
Permissions could be changed by setting the correct setuid bit
chmod 6751 $ORACLE_HOME/bin/oracle
ls -l $ORACLE_HOME/bin/oracle
-rwsr-s--x 1 oracle asmadmin 232437369 Apr 30 14:01 oracle

chmod 6751 $GI_HOME/bin/oracle
ls -l oracle
-rwsr-s--x 1 oracle oinstall 204010819 Apr 30 13:57 oracle
Or with the Oracle supplied setasmgidwrap executable. setasmgidwrap is in the GI_HOME but should be executed only against the ORACLE_HOME's oracle binary and not against the GI_HOME's oralce binary
$CRS_HOME/bin/setasmgidwrap o=$ORACLE_HOME/bin/oracle
If GI_HOME's oracle binary's permission has been changed then this must be set to correct permission manually as above.

Useful Metalink notes
11gR2 GRID User Cannot Connect To ASM Instance [ID 1382648.1]
Pre 11.2 Database Issues in 11gR2 Grid Infrastructure Environment [ID 948456.1]
How to change ownership and group memberships of Grid home in 11.2 Standalone [ID 1171674.1]
ORA-15183 Unable to Create Database on Server using 11.2 ASM and Grid Infrastructure [ID 1054033.1]
Database Creation on 11.2 Grid Infracture with Role Separation ( ORA-15025, KFSG-00312, ORA-15081 ) [ID 1084186.1]