X-Recipient: archive-cygwin@delorie.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 <rurban@x-ray.at>
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@cygwin.com
Subject: Re: Nasty permissions / pathing bug in perl on 1.7
References: <BE3716D1FE6B45B6A50DEB1B448E71ED@multiplay.co.uk>
In-Reply-To: <BE3716D1FE6B45B6A50DEB1B448E71ED@multiplay.co.uk>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.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

