unzip *.zip遇到checkdir error:cannot create database的问题
unzip *.zip遇到‘checkdir error:cannot create database’的问题
案例回顾: www.zzzyk.com
linux的 root下 新建的 oracle用户,然后用 oracle登录 解压oracle10g.zip文件
所用命令:
[oracle@bogon opt]$ unzip oracle10g.zip ---------------注意用户为oracle
checkdir error: cannot create database
unable to process database/stage/Dialogs/HTM LDBDialogs/10.2.0.1.0/.
checkdir error: cannot create database
unable to process database/stage/Dialogs/HTM LDBDialogs/10.2.0.1.0/1/.
checkdir error: cannot create database
unable to process database/stage/Dialogs/HTMLDBDialogs/10.2.0.1.0/1/HTMLDBDialogs.jar.
checkdir error: cannot create database
unable to process database/stage/Dialogs/OiD ynamicXYSpreadTable/.
checkdir error: cannot create database
unable to process database/stage/Dialogs/OiDynamicXYSpreadTable/2.5.0.2.5/.
checkdir error: cannot create database
unable to process database/stage/Dialogs/OiDynamicXYSpreadTable/2.5.0.2.5/1/.
www.zzzyk.com
原因分析:
[oracle@bogon opt]$ unzip oracle10g.zip -----注意用户为oracle
报错很明显:checkdir error: cannot create database
注意查看权限:
[oracle@test ~]$ ll
total 8
-rw-r--r-- 1 root root 0 Mar 7 23:55 =
-rw-r--r-- 1 root root 0 Mar 7 23:55 Finished
drwxr-xr-x 2 root root 4096 Mar 8 00:02 ora10g
drwxr-xr-x 3 root root 4096 Mar 8 10:25 ora11g
-rw-r--r-- 1 root root 0 Mar 7 23:55 Package
-rw-r--r-- 1 root root 0 Mar 7 23:55 Processing
-rw-r--r-- 1 root root 0 Mar 7 23:55 Restarting
-rw-r--r-- 1 root root 0 Mar 7 23:55 Running
[oracle@test ora11g]$ ll
total 2304464
drwxr-xr-x 8 root root 4096 Nov 16 2010 database
-rw-r--r-- 1 root root 1307536871 Mar 8 00:13 p10098816_112020_Linux-x86-64_1of7.zip ------请注意查看权限‘rw-r--r-- 1’ oracle没有写权限 ,
-rw-r--r-- 1 root root 1049912579 Mar 8 00:17 p10098816_112020_Linux-x86-64_2of7.zip -------及不能执行 unzip 命令
[oracle@test ora11g]$
然后我们来观察下 /tmp 目录
[root@test tmp]# ll
total 236
drwx------ 2 root root 4096 Mar 8 00:33 gconfd-root
srwxr-xr-x 1 root root 0 Mar 7 22:55 mapping-root
drwxr-xr-x 4 root root 229376 Mar 7 23:43 Server
注意观察:读取与执行权限 r-x ,所以将*.zip放到/tmp 下就可以解压了
解决方法:
1.使用root 用户来执行unzip 命令
2.使用root用户给oracle添加更大的权限,或者更改文件属主。 chmod / chown