Translate

2015년 2월 26일 목요일

[Linux/Unix] unzip 명령으로 압축을 풀려고 할때 "checkdir error" 라고 나오며 오류 발생하는 경우



문제

윈도우에서 압축한 파일을 맥(OSX Mountain Lion) 에서 unzip 을 이용해서 압축을 풀려고 하면 아래와 같이 에러가 발생했다.
(윈도우에서 압축툴을 사용하지 않고 '보내기' => '압축(ZIP) 폴더' 를 이용해서 압축을 했었다.)


1004lucifer:Downloads huhwook$ unzip 20150226_RabbitMQ_Access_Log.zip 
Archive:  20150226_RabbitMQ_Access_Log.zip
   creating: rabbit/log/
  inflating: rabbit/log/nohup.out_bak  
   creating: rabbit/sp/
  inflating: rabbit/sp/blablaPushSend_20150211.log  
  inflating: rabbit/sp/blablaPushSend_20150212.log  
  inflating: rabbit/sp/blablaPushSend_20150213.log  
  inflating: rabbit/sp/blablaPushSend_20150214.log  
  inflating: rabbit/sp/blablaPushSend_20150215.log  
  inflating: rabbit/sp/blablaPushSend_20150216.log  
  inflating: rabbit/sp/blablaPushSend_20150217.log  
checkdir error:  tomcat exists but is not directory
                 unable to process tomcat/log_85/.
checkdir error:  tomcat exists but is not directory
                 unable to process tomcat/log_85/localhost_access_log.2015-02-13.txt.
checkdir error:  tomcat exists but is not directory
                 unable to process tomcat/log_85/localhost_access_log.2015-02-14.txt.
checkdir error:  tomcat exists but is not directory
                 unable to process tomcat/log_85/localhost_access_log.2015-02-15.txt.
checkdir error:  tomcat exists but is not directory
                 unable to process tomcat/log_86/.
checkdir error:  tomcat exists but is not directory
                 unable to process tomcat/log_86/localhost_access_log.2015-02-13.txt.
checkdir error:  tomcat exists but is not directory
                 unable to process tomcat/log_86/localhost_access_log.2015-02-14.txt.
checkdir error:  tomcat exists but is not directory
                 unable to process tomcat/log_86/localhost_access_log.2015-02-15.txt.
1004lucifer:Downloads huhwook$ 








해결방법

권한에 문제가 있어서 그런지 권한을 바꿔주니 정상적으로 압축이 풀렸다.


1004lucifer:rabbit huhwook$ ll
total 2483808
-rw-r--r--  1 huhwook  staff  1271705839  2 26 18:03 20150226_RabbitMQ_Access_Log.zip
1004lucifer:rabbit huhwook$ 
1004lucifer:rabbit huhwook$ chmod 777 ./20150226_RabbitMQ_Access_Log.zip 
1004lucifer:rabbit huhwook$ 
1004lucifer:rabbit huhwook$ ls -al
total 2483824
drwxr-xr-x    4 huhwook  staff         136  2 26 18:13 .
drwx------+ 345 huhwook  staff       11730  2 26 18:13 ..
-rw-r--r--@   1 huhwook  staff        6148  2 26 18:13 .DS_Store
-rwxrwxrwx    1 huhwook  staff  1271705839  2 26 18:03 20150226_RabbitMQ_Access_Log.zip
1004lucifer:rabbit huhwook$ 
1004lucifer:rabbit huhwook$ unzip 20150226_RabbitMQ_Access_Log.zip 
Archive:  20150226_RabbitMQ_Access_Log.zip
   creating: rabbit/log/
  inflating: rabbit/log/nohup.out_bak  
   creating: rabbit/sp/
  inflating: rabbit/sp/blablaPushSend_20150211.log  
  inflating: rabbit/sp/blablaPushSend_20150212.log  
  inflating: rabbit/sp/blablaPushSend_20150213.log  
  inflating: rabbit/sp/blablaPushSend_20150214.log  
  inflating: rabbit/sp/blablaPushSend_20150215.log  
  inflating: rabbit/sp/blablaPushSend_20150216.log  
  inflating: rabbit/sp/blablaPushSend_20150217.log  
   creating: tomcat/log_85/
  inflating: tomcat/log_85/localhost_access_log.2015-02-13.txt  
  inflating: tomcat/log_85/localhost_access_log.2015-02-14.txt  
  inflating: tomcat/log_85/localhost_access_log.2015-02-15.txt  
   creating: tomcat/log_86/
  inflating: tomcat/log_86/localhost_access_log.2015-02-13.txt  
  inflating: tomcat/log_86/localhost_access_log.2015-02-14.txt  
  inflating: tomcat/log_86/localhost_access_log.2015-02-15.txt  
1004lucifer:rabbit huhwook$



PS.
굳이 777 권한이 필요할까라고 생각이 들기도 하지만 최소 권한이 어느정도 있어야 하는지 알아보기 귀찮아졌다.



참조
http://devnumbertwo.com/checkdir-error-cannot-create/

댓글 없음 :

댓글 쓰기