建立raw device tablespace報Linux Error: 13: Permission denied
---查詢oracle使用者的使用者組
[root@rhel5 ~]# id oracle
uid=502(oracle) gid=102(oinstall) groups=102(oinstall),103(dba)
---給新建的卷組vg2授權
[root@rhel5 ~]# chown -Rf oracle:oinstall /dev/vg2
[root@rhel5 ~]# chmod -Rf 777 /dev/vg2
---切到oracle
[root@rhel5 ~]# su - oracle
-bash-3.2$ sqlplus '/as sysdba'
SQL*Plus: Release 11.2.0.1.0 Production on Fri Jun 21 10:02:56 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 313860096 bytes
Fixed Size 1336232 bytes
Variable Size 159386712 bytes
Database Buffers 146800640 bytes
Redo Buffers 6336512 bytes
Database mounted.
Database opened.
SQL> select file#,name from v$datafile
FILE# NAME
---------- --------------------------------------------------
1 /oracle/app/oracle/oradata/zxy/system01.dbf
2 /oracle/app/oracle/oradata/zxy/sysaux01.dbf
3 /oracle/app/oracle/oradata/zxy/undotbs01.dbf
4 /oracle/app/oracle/oradata/zxy/users01.dbf
5 /oracle/newwisdomone.dbf
6 /oracle/rawfile
7 /oracle/rawfile2
8 /oracle/tbs_mod1.dbf
9 /oracle/tbs_mod2_newposition.dbf
9 rows selected.
---建立裸裝置表空間報許可權不足
SQL> create tablespace tbs_top datafile '/dev/vg2/lv2' size 30m;
create tablespace tbs_top datafile '/dev/vg2/lv2' size 30m
*
ERROR at line 1:
ORA-01119: error in creating database file '/dev/vg2/lv2'
ORA-27041: unable to open file
Linux Error: 13: Permission denied
Additional information: 1
---確認卷組vg2的許可權與使用者組,是正確的
[root@rhel5 ~]# ls -l /dev/vg2
total 0
lrwxrwxrwx 1 oracle oinstall 19 Jun 21 09:59 lv2 -> /dev/mapper/vg2-lv2 ----注意:這裡lv2是個連結檔案
[root@rhel5 ~]# ls -l /oracle/tbs_mod2_newposition.dbf
-rw-r----- 1 oracle oinstall 26222592 Jun 21 10:03 /oracle/tbs_mod2_newposition.dbf
[root@rhel5 ~]# ls -l /dev/vg2/lv2
lrwxrwxrwx 1 oracle oinstall 19 Jun 21 09:59 /dev/vg2/lv2 -> /dev/mapper/vg2-lv2
----檢視lv2連結檔案對應的真正檔案
[root@rhel5 ~]# ls -l /dev/mapper/vg2-lv2
brw-rw---- 1 root disk 253, 1 Jun 21 09:59 /dev/mapper/vg2-lv2 --可以看到還是root:disk
----給lv2對應的真正檔案授權
[root@rhel5 ~]# chown -Rf oracle:oinstall /dev/mapper/vg2-lv2
[root@rhel5 ~]# ls -l /dev/mapper/vg2-lv2
brw-rw---- 1 oracle oinstall 253, 1 Jun 21 09:59 /dev/mapper/vg2-lv2
[root@rhel5 ~]# chmod -Rf 777 /dev/mapper/vg2-lv2
[root@rhel5 ~]# su - oracle
-bash-3.2$ sqlplus '/as sysdba'
SQL*Plus: Release 11.2.0.1.0 Production on Fri Jun 21 10:07:28 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
---建立裸裝置表空間成功
SQL> create tablespace tbs_top datafile '/dev/vg2/lv2' size 30m;
Tablespace created.
---為了防止重啟主機反覆授權直接新增裸裝置的連結及真正檔案到/etc/profile中
[root@rhel5 ~]# tail -5 /etc/profile
chown -Rf oracle:oinstall /dev/mapper/vg2-lv2
chmod -Rf 777 /dev/mapper/vg2-lv2
chown -Rf oracle:oinstall /dev/vg2
chmod -Rf 777 /dev/vg2
小結:
1,連結與真正裝置檔案都要進行授權
2,上述授權指令碼寫入到/etc/profile中
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-764556/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- nginx部署(13:Permission denied)報錯Nginx
- Android Studio: /dev/kvm device permission deniedAndroiddev
- Nginx: stat() failed (13: permission denied)NginxAI
- Python 執行報錯 PermissionError: [Errno 13] Permission denied: '***.***'PythonError
- Error: Permission denied @ apply2filesErrorAPP
- Python報錯:PermissionError: [Errno 13] Permission denied解決方案PythonError
- Ubuntu git pull 出現Permission denied ErrorUbuntuGitError
- PermissionError: [Errno 13] Permission denied 如何解決Error
- 詳解Nginx 13: Permission denied 解決方案Nginx
- PermissionError: [Errno 13] Permission denied解決辦法Error
- Android10 建立檔案 Permission deniedAndroid
- hive建立分割槽表報錯AccessControlException Permission denied: user=NONE, access=WRITE, inodeHiveExceptionNone
- PermissionError: [Errno 13] Permission denied: 'C:\\Users\\hao\\Desktop\\test.xlsx'Error
- IOError: [Errno 13] Permission denied 解決:linux下python安裝並使用非root模組ErrorLinuxPython
- Nginx 日誌 failed (13: Permission denied) 錯誤(13:許可權被拒絕)NginxAI
- Nginx報錯:Permission denied,沒有許可權!Nginx
- PermissionError: [Errno 13] Permission denied:的許可權該怎麼解決。。。Error
- 【Android】Permission denied (missing INTERNET permission?)異常踩坑Android
- Angular macOS Err:EACCES: permission deniedAngularMac
- frepplectl解決報錯:bash: /usr/bin/frepplectl: Permission denied
- 關於LINUX許可權-bash: ./startup.sh: Permission deniedLinux
- 成功解決PermissionError: [Errno 13] Permission denied: './data\\mnist\\train-images-idx3-ubyte'ErrorAI
- PermissionError: [Errno 13] Permission denied: 'C:\\Users\\jason\\Documents\\t2'的解決方案Error
- PHP中 mkdir: Permission denied 問題PHP
- Linux的wheel組:LINUX下使用者使用su命令切換使用者報錯su: Permission deniedLinux
- Permission denied Command PhaseScriptExecution failed with a nonzero exit codeAI
- Permission denied:user=xxx,access=WRITE,inode=xxx
- 解決“su: cannot open session: Permission denied”Session
- git push出現Permission denied (publickey)錯誤Git
- unix /var/run/docker.sock: connect: permission deniedDocker
- Docker + maven build problem — unix://localhost:80: Permission deniedDockerMavenUIlocalhost
- listen EACCES: permission denied 0.0.0.0:9520 at Server.setupListenHandleServer
- 易優CMS後臺上傳圖片報錯mkdir(): Permission denied 報錯-eyoucms
- 在Linux上啟動Tomcat,結果彈出:-bash: ./startup.sh: Permission deniedLinuxTomcat
- Android adb除錯出現:opendir failed, Permission deniedAndroid除錯AI
- 【踩坑筆記】專案出現Permission denied筆記
- 寶塔解決 mkdir() Permission Denied 的問題
- 解決centos 刪除資料夾 permission deniedCentOS
- git出現Permission denied的解決辦法Git