Running a SQL Script with Permissions set to 600 Fails with SQL*Plus Client Installed on UNIX (Doc ID 1161443.1)

Last updated on JUNE 27, 2017

Applies to:

SQL*Plus - Version 10.1.0.2 to 11.1.0.7 [Release Oracle10g to 11.1]
Information in this document applies to any platform.
***Checked for relevance on 31-Aug-2012***

Symptoms

Installed a fresh SQL*Plus client on AIX, applied patch 6800649 and followed Note 880403.1.  Running a script created from Perl, with file permissions set to 600, fails to execute with error: 

Error SP2-0310: unable to open file "test.sql"


The owner of Perl script (non-oracle) has read+write privileges, as follows:


bash-3.2$ ls -altr test.sql
-rw------- 1 nonoracle nonoracle test.sql
-bash-3.2$ sqlplus /nolog @test


It still fails when executed using the Client SQL*plus installed as owner "Oracle" and being given proper permission to "Non Oracle" user as per Note 880403.1:

SQL*Plus: Release 11.1.0.7.0 - Production on Thu Jul 22 18:32:38 2010
Copyright (c) 1982, 2008, Oracle. All rights reserved.
SP2-0310: unable to open file "test.sql"
SQL>



When permission of the file is changed to 640 (granting read permission to "Group"), it works as:

-bash-3.2$
-bash-3.2$ chmod 640 test.sql
-bash-3.2$ ls -altr test.sql
-rw-r----- 1 nonoracle nonoracle test.sql
-bash-3.2$ sqlplus /nolog @test

SQL*Plus: Release 11.1.0.7.0 - Production on Thu Jul 22 18:32:49 2010
Copyright (c) 1982, 2008, Oracle. All rights reserved.



Changes

Additional change has been done to give Client's $ORACLE_HOME the 6755 permissions.

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