X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-498008.0 required=5.0 tests=AWL,BAYES_50 X-Spam-Check-By: sourceware.org X-MDAV-Processed: mail1.multiplay.co.uk, Sun, 29 Nov 2009 18:43:53 +0000 X-Spam-Processed: mail1.multiplay.co.uk, Sun, 29 Nov 2009 18:43:53 +0000 (not processed: message from trusted or authenticated source) X-MDRemoteIP: 213.123.247.160 X-Return-Path: prvs=1584594039=killing AT multiplay DOT co DOT uk X-Envelope-From: killing AT multiplay DOT co DOT uk X-MDaemon-Deliver-To: cygwin AT cygwin DOT com Message-ID: From: "Steven Hartland" To: "Cygwin List" Subject: Nasty permissions / pathing bug in perl on 1.7 Date: Sun, 29 Nov 2009 18:43:49 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original 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 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 -- 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