2

Oracle 11g Release 2 Oracle Linux Enterprise 5.10

[oracle@dub-ImrORA3 scripts]$ id oracle
uid=502(oracle) gid=502(oinstall) groups=502(oinstall),503(dba),504(oper)           context=user_u:system_r:unconfined_t

We recently changed the oracle id to 502 and the group oinstall to 502.

Everything under the $ORACLE_HOME/bin is owned by oracle:oinstall

Since this change we can only connect locally to the database using IPC. When we try to connect remotely using TCP we the error => ORA-12537: TNS:connection closed

When the oracle user tries to stop the LISTENER we get the TNS-01190 error.

[oracle@dub-ImrORA3 bin]$ ls -al lsnrctl
-rwxr-x--x 1 oracle oinstall 153535 Nov 26 09:45 lsnrctl

Is this an ownership/permission issue? How to resolve?

9
  • Did you stop the listener and database processes before changing the file ownership and uid/gid of the user/group? Have a look with ps. If not, that'll be the problem - the running processes would be horribly confused.
    – Philᵀᴹ
    Feb 4, 2015 at 20:04
  • Yes, we stopped the listener and database before change ownership. And we were able to bring the database back up.
    – Stringer
    Feb 4, 2015 at 20:06
  • 1
    I did a blanket chown -R, which I think is the problem.
    – Stringer
    Feb 4, 2015 at 20:18
  • 1
    Almost certainly. Your best bet is to get a file listing from a similar server and write a small script to set the correct permissions, or do a reinstall. Not much more we can do to help. In the first instance I'd probably stop the DB, kill the listener, then do a blanket cd $ORACLE_HOME; chown -R oracle:dba bin lib lib32 network - anyway, you've messed it up by taking shortcuts
    – Philᵀᴹ
    Feb 4, 2015 at 20:22
  • 1
    Got it fixed. Changed owner of oradism to root:oinstall and rebooted server. DB started, but not listener. Got different error message: ERROR: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=IMR1))). Changed IMR1 to IMR0 then listener started successfully. Wish I understood this issue better. But thanks for your help.
    – Stringer
    Feb 4, 2015 at 20:42

1 Answer 1

0

Yes, this is an issue with owner and group of lot's of files in oracle home. Most files are of oracle:oinstall but not all. Some are owned by root and some owned by nobody.

A safer solution for this would be

find -user {old_uid} |xargs chown {new_uid}
find -group {old_gid}|xargs chgrp {new_gid}

and yes, this should run as root.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.