Quantcast

checkdir: cannot create extraction directory

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

checkdir: cannot create extraction directory

bh77
I am trying to unzip a file using the following command from a bash script under cygwin and receive the following error - which looks as though it may be permissions related. Does anyone have any idea what may be causing it ?

code :
# if the target directory does not exist, create it.
if [ ! -d ${TARGET_DIR} ]
then
  echo making target dir
  mkdir ${TARGET_DIR}
fi
unzip -u ${SRC_DIR} "**/*.jar" -d ${TARGET_DIR}

error:
checkdir:  cannot create extraction directory /cygdrive/c/target

any ideas ?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: checkdir: cannot create extraction directory

bh77
sorry that should read

# if the target directory does not exist, create it.
if [ ! -d ${TARGET_DIR} ]
then
  echo making target dir
  mkdir ${TARGET_DIR}
fi
unzip -u ${SRC_ZIP} "**/*.jar" -d ${TARGET_DIR}
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: checkdir: cannot create extraction directory

Igor Peshansky
In reply to this post by bh77
On Tue, 20 Jun 2006, bh77 wrote:

> I am trying to unzip a file using the following command from a bash script
> under cygwin and receive the following error - which looks as though it may
> be permissions related. Does anyone have any idea what may be causing it ?
>
> code :
> # if the target directory does not exist, create it.
> if [ ! -d ${TARGET_DIR} ]
> then
>   echo making target dir
>   mkdir ${TARGET_DIR}
> fi
> unzip -u ${SRC_DIR} "**/*.jar" -d ${TARGET_DIR}
>
> error:
> checkdir:  cannot create extraction directory /cygdrive/c/target
> any ideas ?

Yes: use quotes around variable references.  The above is what you can get
when your directory names contain spaces.
        Igor
--
                                http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_    [hidden email] | [hidden email]
ZZZzz /,`.-'`'    -.  ;-;;,_ Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-' old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: checkdir: cannot create extraction directory

bh77
e.g unzip -u "${SRC_ZIP}"  "**/*.jar" -d "${TARGET_DIR}"
there are no spaces in the directory structure - there are however the following characters:
 -._ (dash, fullstop and underscore)

would any of these have the same effect ?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: checkdir: cannot create extraction directory

Larry Hall (Cygwin)
In reply to this post by bh77
bh77 wrote:

> I am trying to unzip a file using the following command from a bash script
> under cygwin and receive the following error - which looks as though it may
> be permissions related. Does anyone have any idea what may be causing it ?
>
> code :
> # if the target directory does not exist, create it.
> if [ ! -d ${TARGET_DIR} ]
> then
>   echo making target dir
>   mkdir ${TARGET_DIR}
> fi
> unzip -u ${SRC_DIR} "**/*.jar" -d ${TARGET_DIR}
>
> error:
> checkdir:  cannot create extraction directory /cygdrive/c/target
>
> any ideas ?


You're not using the Cygwin version of unzip?  What does 'cygcheck unzip' say?


--
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
838 Washington Street                   (508) 893-9889 - FAX
Holliston, MA 01746

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: checkdir: cannot create extraction directory

bh77
$> cygcheck unzip
Found: C:\cygwin\bin\unzip.exe
C:/cygwin/bin/unzip.exe
  C:\cygwin\bin\cygwin1.dll
    C:\WINDOWS\system32\ADVAPI32.DLL
      C:\WINDOWS\system32\ntdll.dll
      C:\WINDOWS\system32\KERNEL32.dll
      C:\WINDOWS\system32\RPCRT4.dll
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: checkdir: cannot create extraction directory

Larry Hall (Cygwin)
bh77 wrote:
> $> cygcheck unzip
> Found: C:\cygwin\bin\unzip.exe
> C:/cygwin/bin/unzip.exe
>   C:\cygwin\bin\cygwin1.dll
>     C:\WINDOWS\system32\ADVAPI32.DLL
>       C:\WINDOWS\system32\ntdll.dll
>       C:\WINDOWS\system32\KERNEL32.dll
>       C:\WINDOWS\system32\RPCRT4.dll


OK then.  Well, I guess it's back to the beginning on this one:

> Problem reports:       http://cygwin.com/problems.html

It may be a permissions problem so it's worth checking that out
if you haven't already too.  Don't forget about 'getfacl' to find
the the ACL permissions.

--
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
838 Washington Street                   (508) 893-9889 - FAX
Holliston, MA 01746

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Loading...