Mkdir seems to be losing the permissions when creating a directory under
cron (even though NTSec is set on the service). Zip/Unzip do not find
files or directories created on the cron script (the bash seem to find
them okay though).

cron_diagnose.sh 1.5 returns no errors.

Here is a sample cron script that reproduces my problem:

----------bustcron.sh -------------------------
echo "Cygwin: $CYGWIN"
mkdir -p $TMP/nested/source
mkdir -p $TMP/nested/dest
echo "Creating temp file.."

echo "Something" > $TMP/nested/source/dude.txt

echo "Temp file contents:"
cat $TMP/nested/source/dude.txt

echo "Trying to Zip"
zip $TMP/nested/azip.zip $TMP/nested/source/dude.txt
echo "Trying to unzip"
unzip -d $TMP/nested/dest $TMP/nested/azip.zip
---------------------------------------------

This runs fine under my user directory. But under cron, it breaks as
follows:
-------------------------
Cygwin: ntsec
Creating temp file..
Temp file contents:
Something
Trying to Zip
zip warning: name not matched:
/cygdrive/c/WINNT/TEMP/nested/source/dude.txt

zip error: Nothing to do! (/cygdrive/c/WINNT/TEMP/nested/azip.zip)
Trying to unzip
checkdir:  cannot create extraction directory:
/cygdrive/c/WINNT/TEMP/nested/dest
---------------------

Note that ntsec is already set on the cygwin variable.

My "Real" production script is trying to unzip something created on a
linux box (no ZIP stage). I went through the source of Unzip and it
looks like MKDIR() is returning -1 (hence the "cannot create extraction
dir" message).

Since the directory was already created with mkdir -p, maybe it exists
but the cygdll can't read from it? Could there be a problem with the -p
option of mkdir?


Any suggestions would be greatly appreciated. This is part of a build
automation system that requires windows and I don't want to use batch
files :-)

Thanks!


- David Martinez

--
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 via email to