前言
最近在開發(fā)環(huán)境 oracle 啟動偵聽的時候,出現(xiàn)了 TNS:permission denied 的問題,通過網(wǎng)上和咨詢朋友,最終找到了解決方案,現(xiàn)在共享出來給有需要的朋友。
錯誤描述
[oracle@oracle ~]$ lsnrctl start
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 27-MAR-2015 15:37:59
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/oracle/listener/alert/log.xml
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12555: TNS:permission denied
TNS-12560: TNS:protocol adapter error
TNS-00525: Insufficient privilege for operation
Linux Error: 1: Operation not permitted
Listener failed to start. See the error message(s) above...
解決方案
出現(xiàn)這個錯誤是由于沒有 /var/tmp/.oracle
的讀寫權(quán)限引起的。由于開發(fā)環(huán)境沒有嚴(yán)格管理,不知道哪位同學(xué)把此目錄的所有者改成了root,導(dǎo)致 oracle 用戶沒有權(quán)限操作此目錄。使用下面方式修正過來即可。
cd /var/tmp
chown oracle .oracle
chgrp oinstall .oracle
chmod 777 .oracle
看到網(wǎng)上有資料說 直接干掉 /var/tmp/.oracle
這個目錄也是可以的,我沒有嘗試,不知道效果如何,這里僅作筆記。
總結(jié)
以上就是這篇文章的全部內(nèi)容了,希望本文的內(nèi)容對大家的學(xué)習(xí)或者工作能帶來一定的幫助,如果有疑問大家可以留言交流。
您可能感興趣的文章:- Apache啟動錯誤Permission denied: httpd: could not open error log file解決方法
- Python中Permission denied的解決方案
- docker 命令報異常permission denied的解決方案
- Permission denied的解決方法