Simpler Navigation coming for Servers and Operating Systems
Coming soon: a much simpler Servers and Operating Systems section of the Community. We will combine many of the older boards, and you won't have to click through so many levels to get at the information you need. If you are looking for an older board and do not find it, check the consolidated boards, as the posts are still there.
Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

Oracle SQLPLUS - permission denied on "/dev/null"

SOLVED
Go to solution

Oracle SQLPLUS - permission denied on "/dev/null"

Oracle 8i 8.1.7.3.0 64bit on HP-UX 11.00 64bit

SQLPLUS
>select 'abc'
2 from dual
;
'AB
---
abc
>edit
Wrote file afiedt.buf
/dev/null: Permission denied
>exit

>ls -l afiedt.buf
-rwxrwxrwx
>ls -l /dev/null
crw-rw-rw-
>cat >/dev/null
abc
Cntrl-d
>
>cat login.sql
...
define _editor=vi
...

Any ideas, suggestions welcome

Steve
7 REPLIES
T G Manikandan
Honored Contributor

Re: Oracle SQLPLUS - permission denied on "/dev/null"

check the permissions for /dev/null

crw-rw-rw- 1 bin bin 3 0x000002 Jul 10 17:49 /dev/null

Re: Oracle SQLPLUS - permission denied on "/dev/null"

Thanks for your reply ...

The output from ls -l /dev/null is given in my original posting


Steve
Thierry Poels_1
Honored Contributor

Re: Oracle SQLPLUS - permission denied on "/dev/null"

Hi,

hmmmm funny thing going on ...

"edit" in SQL*Plus saves the commands to your editfile (default is afiedt.buf), then uses the defined editor to edit this file and afterwards reads the editfile into the command buffer.

- the save seems to work
- start of the editor probably gives the "Permission denied" error.

Things to check:
- which editor is being used
- editor executable linked to /dev/null??
Have a look in that direction.

good luck,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
T G Manikandan
Honored Contributor

Re: Oracle SQLPLUS - permission denied on "/dev/null"

set the default editor as vi


EDITOR=vi
export EDITOR

check your permissions of vi

-r-xr-xr-t 6 bin bin 249856 Jan 16 1998 /usr/bin/vi

afiedt.buf is owned by user oracle.

Try also re-creating your /dev/null file

#rm -f /dev/null
#insf -d mm


Thanks

Re: Oracle SQLPLUS - permission denied on "/dev/null"

Thanks for the replies ...

/home/ke1716>echo $EDITOR
vi
/home/ke1716>ls -l /usr/bin/vi
-r-xr-xr-t root bin
/home/ke1716>ls -l afiedt.buf
-rwxrwxrwx ke1716 other

/home/ke1716>cat login.sql
...
define _editor=vi
...
set sqlprompt '&gname> '

I know the file login.sql is used as my sqlplus prompt is set correctly

I am just a humble User on this machine ( ke1716 ), I don't have the permissions to recreate /dev/null. But if thats what is required I will get it done. But, what about this ...

sqlplus system/manager
>host date
/dev/null: Permission denied

Thanks

Steve



Thierry Poels_1
Honored Contributor
Solution

Re: Oracle SQLPLUS - permission denied on "/dev/null"

BINGO!!!!

Check your SHELL variable! It is set to /dev/null, probably to prevent users to execute OS commands from within an application.

regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.

Re: Oracle SQLPLUS - permission denied on "/dev/null"

Thanks for the reply

Yes, you are right, my SHELL is /dev/null
>/home/ke1716>echo $SHELL
/dev/null
>/home/ke1716>export SHELL=/usr/bin/ksh
SHELL is read only

As you suggest, this is some kind of security restriction I was not aware of. I will take this up with our Unix security people.
Points will be awarded, many thanks to all who have helped me today.


Steve