X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Message-ID: <4B12FB72.9090206@x-ray.at> Date: Sun, 29 Nov 2009 23:53:38 +0100 From: Reini Urban User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.4) Gecko/20091017 SeaMonkey/2.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Nasty permissions / pathing bug in perl on 1.7 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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 Steven Hartland schrieb: > Just been chasing my tail for hours trying to figure out why the > permissions > on a file weren't being set even though no error was being thrown. > > It turns out that giving a dos like path to chmod in perl under 1.7 > although doesn't error it doesn't do anything either. > > Here's my little test case: > [script] > #!/usr/bin/perl -w > use strict; > > unlink '/tmp/test.exe'; > > print `touch /tmp/test.exe; ls -l /tmp/test.exe`; > > if ( ! chmod 0777, 'C:/cygwin/tmp/test.exe' ) > { > print STDERR "Failed to chmod ($!)\n"; > exit 1; > } > > print `ls -l /tmp/test.exe`; > > if ( ! chmod 0777, '/tmp/test.exe' ) > { > print STDERR "Failed to chmod ($!)\n"; > exit 1; > } > print `ls -l /tmp/test.exe`; > [/script] > > The output of this here is: > ./t.pl -rw-r--r-- 1 root None 0 Nov 29 18:41 /tmp/test.exe > -rw-r--r-- 1 root None 0 Nov 29 18:41 /tmp/test.exe > -rwxrwxrwx 1 root None 0 Nov 29 18:41 /tmp/test.exe > > As you can see after the first chmod using a dos like path no error is > generated but the operation silently fails. > > This is using 1.7 from about a month back, so would be good if someone with > a current version could test to see if this is still an issue as its very > nasty imo. > > CYGWIN_NT-6.1-WOW64 blade23 1.7.0(0.212/5/3) 2009-09-11 01:25 i686 Cygwin > > Regards > Steve Works okay with the current perl-5.10.1-1 for 1.7 which will be announced later today. -- Reini Urban http://phpwiki.org/ http://murbreak.at/ -- 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