delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/03/11/19:45:46

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
Date: Fri, 11 Mar 2005 16:45:31 -0800
From: Yitzchak Scott-Thoennes <sthoenna AT efn DOT org>
To: cygwin AT cygwin DOT com, perl5-porters AT perl DOT org
Subject: Re: Problem with the "-r" test in Perl 5.8.6-4
Message-ID: <20050312004530.GA800@efn.org>
Mail-Followup-To: Yitzchak Scott-Thoennes <sthoenna AT efn DOT org>, cygwin AT cygwin DOT com, perl5-porters AT perl DOT org
References: <Pine DOT GSO DOT 4 DOT 61 DOT 0503102033040 DOT 2884 AT slinky DOT cs DOT nyu DOT edu> <20050311230211 DOT GA2872 AT efn DOT org> <Pine DOT GSO DOT 4 DOT 61 DOT 0503111811490 DOT 23792 AT slinky DOT cs DOT nyu DOT edu>
Mime-Version: 1.0
In-Reply-To: <Pine.GSO.4.61.0503111811490.23792@slinky.cs.nyu.edu>
User-Agent: Mutt/1.4.1i
Organization: bs"d
X-IsSubscribed: yes

On Fri, Mar 11, 2005 at 06:12:58PM -0500, Igor Pechtchanski wrote:
> On Fri, 11 Mar 2005, Yitzchak Scott-Thoennes wrote:
> 
> > On Thu, Mar 10, 2005 at 08:44:40PM -0500, Igor Pechtchanski wrote:
> > > Hi,
> > >
> > > I'm having trouble with Perl 5.8.6-4 under Cygwin 1.5.12.
> > >
> > > $ perl -e 'exit !(-r $ARGV[0])' /cygdrive/c/Program\ Files/ThinkPad/Utilities && echo "yep"
> > > $ test -r /cygdrive/c/Program\ Files/ThinkPad/Utilities && echo "yep"
> > > yep
> > >
> > > Is this behavior by design, or does perl actually check ACLs and something
> > > is wrong with my installation?
> > > 	Igor
> >
> > perldoc -f -r:
> >
> >               The interpretation of the file permission operators "-r", "-R",
> >               "-w", "-W", "-x", and "-X" is by default based solely on the
> >               mode of the file and the uids and gids of the user.  There may
> >               be other reasons you can't actually read, write, or execute the
> >               file.  Such reasons may be for example network filesystem
> >               access controls, ACLs (access control lists), read-only
> >               filesystems, and unrecognized executable formats.
> >
> > You can try the filetest pragma: use filetest 'access';
> > see perldoc filetest.
> 
> I see.  So basically this isn't likely to change in Perl, and so is a bug
> in the program that uses -r here.  I'll report this as a bug, then.
> Thanks,
> 	Igor

There was some discussion about this a while ago; a quick read of
http://guest:guest AT rt DOT perl DOT org/rt3/Ticket/Display.html?id=30885
makes me think AIX was changed to always use access; perhaps doing
so for cygwin would also be an option.  I'm not sure why the original
call was made to not use access() by default where available.

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019