Non-Oracle User Unable To Access Sqlplus. Permission Denied Error (Doc ID 1223449.1)

Last updated on MAY 31, 2017

Applies to:

SQL*Plus - Version 11.1.0.7 and later
Generic UNIX

Symptoms

Non-oracle user is trying to login to database via SQL*Plus. The environment is setup correctly, but attempts to access sqlplus results in a permission denied error. Trying to execute sqlplus as oracle user works fine.

Example

Environment Variables for oracle and non-oracle user
ORACLE_HOME=/u01/app/oracle/product/11.1.0.7
PATH=/u01/app/oracle/product/11.1.0.7/bin:.:/bin:/usr/kerberos/bin:/usr/local/adm/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin

[-] sqlplus executable is owned by "oracle" user and it belongs to "oinstall" group.
[-] Non-oracle user does not belong to "oinstall" group.

sqlplus permissions
-rwxr-xr-x 1 oracle oinstall 9173 May 3 16:32 sqlplus
[-] From above permissions it is clear that users that do not belong to "oinstall" group can read and execute sqlplus. Permissions for others is "r-x"

Connected as non-oracle user
$ sqlplus
-bash: sqlplus: command not found

$ /u01/app/oracle/product/11.1.0.7/bin/sqlplus
-bash: /u01/app/oracle/product/11.1.0.7/bin/sqlplus: Permission denied

$ ls -l $ORACLE_HOME/bin/sqlplus
ls: /u01/app/oracle/product/11.1.0.7/bin/sqlplus: Permission denied

$ which sqlplus
/usr/bin/which: no sqlplus in (/u01/app/oracle/product/11.1.0.7/bin:.:/bin:/usr/kerberos/bin:/usr/local/adm/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin)

Connected as oracle user
$ ls -l $ORACLE_HOME/bin/sqlplus
-rwxr-xr-x 1 oracle oinstall 9173 May 3 16:32 /u01/app/oracle/product/11.1.0.7/bin/sqlplus

$ which sqlplus
/u01/app/oracle/product/11.1.0.7/bin/sqlplus

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms