After installing Oracle 11g Client on RHEL 5.4, I encountered a “permission denied” error while attempting to invoke SQL*Plus. This occurred on two separate installations one 11gR1 and the other 11gR2.
First, the 11gR1 installation with the following symptoms:
Non-oracle user is trying to login to database via SQL*Plus, but attempts to access sqlplus result in a permission denied error. Execution of sqlplus as oracle user works fine.
This is explained in Oracle Support Doc ID 1223449.1.
There is a lack of ‘read “r”‘ and ‘execute “x”‘ permissions on an upper directory which was not allowing access to sqlplus file.
Without execute permission on a directory, a user cannot access files in that directory even if they own them and have all permissions on them.
Add “r-x” permissions to “others” on upper directory (ex. /u01/app).
Following the recommendation above, I executed the commands below to successfully remediate the problem.
% cd /u01/app
% chmod 755 oracle
For the 11gR2 installation, I changed the permission as suggested, however the error below arises:
sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory
An explanation is provided in Oracle Support Doc ID 1206898.1.
The environment variable LD_LIBRARY_PATH was not set to include the 11g Client directory or the environment variable was set incorrectly.
Set the environment variable LD_LIBRARY_PATH to include the 11g Client directory.
Following the instructions mentioned above resolved my problems and all is functioning well.