delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
MIME-Version: | 1.0 |
Subject: | ZIP 2.3/Unzip UnZip 5.50, cron and mkdir |
Date: | Thu, 26 Aug 2004 07:39:03 -0700 |
Message-ID: | <6AA529466FDAE7429E48E44688DC8A2D0130C805@phoebus.managestar.com> |
X-MS-Has-Attach: | |
X-MS-TNEF-Correlator: | |
From: | <david DOT martinez AT managestar DOT com> |
To: | <cygwin AT cygwin DOT com> |
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id i7QEdl7R017427 |
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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |