I had never installed one-off patches before and last week I got my first opportunity. I turned out to be a nightmare!! I could not get it to work. Oracle support could not figure out my problem!! At the end of the day it turned out to be 2 very simple things. One of them Oracle support had never encountered!
Errors:
There is no $ORACLE_HOME to apply the patch to.
and
Same error: opendir(/opt/product/IAS/10.1.2.0.2/reports/../../../../..): Permission denied at /opt/product/IAS/10.1.2.0.2/reports/OPatch/perl_modules/Command.pm line 8384
Main problem opatch lsinventory could not accept the ORACLE_HOME for the reports server.
First solution. We found /etc/oraInst.loc pointing to a different Oracle app inventory which was the Oracle Warehouse Builder. Apparently the OWB installation puts that file there even though we set it in the OWB_HOME prior to the installation. Changing this file to point to the correct inventory was necessary. This is common issue if you have more than one Oracle application running on the same server under the same user. You need to update the oraInst.loc in /etc/ whenever you need to apply patches.
Second solution. This part had the Oracle Support scratching their heads. Still opatch lsinventory complained about ORACLE_HOME not being set – even though echo $ORACLE_HOME output was correct. They asked us to get UNIX admin to unmount the partition and remount it as readable. We tried that and a half other odd fixes without success. Finally Oracle support asked me to give them some trace dumps for them to analyze. The solution ended simply to make / readable by all!
How it was with ls -ld /
drwxr-x--x 35 root root 1024 Oct 1 00:52 /
After fix
drwxr-xr-x 35 root root 1024 Oct 1 01:52 /
Apparently the unix fellow who setup these servers for us thought it would be a security benefit if / was unreadable by all except root user. Unfortunately, Oracle cannot patch any of its applications with one-off patches when / unreadable by the oracle user.