X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=BAYES_00,J_CHICKENPOX_43,J_CHICKENPOX_53,J_CHICKENPOX_93,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <24400289.post@talk.nabble.com> Date: Wed, 8 Jul 2009 15:10:32 -0700 (PDT) From: roc97007 To: cygwin AT cygwin DOT com Subject: identical scripts don't behave identically MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com We have been seeing bizarre results from Cygwin 1.5.25-15 on Windows Server 2003 R2. I have reduced the problem to the following test: I have two files with identical permissions located in the same directory: -rwxrwxrwx 1 christian.ron mkpasswd 16 Jul 8 14:56 aab.sh -rwxrwxrwx 1 christian.ron mkpasswd 18 Jul 8 14:38 aaa.sh They have identical contents: $ cat aaa.sh #!/bin/bash ls $ cat aab.sh #!/bin/bash ls They have identical ACLs $ getfacl aaa.sh # file: aaa.sh # owner: christian.ron # group: mkpasswd user::--- group::--- mask:rwx other:rwx $ getfacl aab.sh # file: aab.sh # owner: christian.ron # group: mkpasswd user::--- group::--- mask:rwx other:rwx Now, nothing up my sleeve, when aaa.sh is executed: $ ./aaa.sh : No such file or directory When aab.sh is executed: $ ./aab.sh Copy of ad_synch.sql blarg.sh foo.sh xxx.sh Copy of enchilada.sh~ broken.sh foob1.sh xxx1.sh aaa.sh enchilada.bat foob2.sh aab.sh enchilada.sh~ test.sql ad_synch.sql enchilada.sql the_whole_enchilada.txt To summarize, as far as I can tell the files are identical, but one works and the other can't seem to find the current directory. If, in the broken script, I substitute any command that needs to read or write to or from the file system, it will always fail with "file not found" or "no such file or directory". The other script with the exact same commands (assuming they are legal and reasonable) will always work. Obviously there is a difference between the files. I can't figure out what it is. The issue is demonstrably a characteristic of the file, because if I delete or rename aaa.sh and then "cp aab.sh aaa.sh", then they will both work. This is driving me crazy. We are under a deadline, and some scripts work and some do not, seemingly randomly. Our current work-around is to copy a script that works to a different name and then replace the content. This is a ridiculous workaround, and since we don't know what the mechanism is we have no idea if it'll still work tomorrow or next week. Please help! -- View this message in context: http://www.nabble.com/identical-scripts-don%27t-behave-identically-tp24400289p24400289.html Sent from the Cygwin list mailing list archive at Nabble.com. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple