Oracle 10g + Redhat5,安装使用一切正常,安装用户oracle。



今天用oracle用户启动sqlplus正常
[abc@rhel4 admin]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Apr 23 12:11:25 2009
Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL>

但是,启动listener的时候,报错了:
[abc@rhel4 admin]$ lsnrctl
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 23-APR-2009 12:13:06
Copyright (c) 1991, 2005, Oracle.  All rights reserved.
Welcome to LSNRCTL, type "help" for information.

LSNRCTL> start
Starting /u01/app/oracle/product/10.2.0/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/10.2.0/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/10.2.0/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
TNS-12555: TNS:permission denied
TNS-12560: TNS:protocol adapter error
  TNS-00525: Insufficient privilege for operation
   Linux Error: 1: Operation not permitted




通过日志错误信息可知,应该跟权限有关,最后发现了一个隐藏的信息,

/var/tmp/.oracle这个目录比较特殊,如果oracle没有对此目录的操作权限的话,oracle用户就无法进入/var/tmp/.oracle文件夹.

方法很简单,执行:chmod 777 /var/tmp/.oracle 

之后就ok了.