delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/04/27/16:16:03

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <430f10bb0904252241w6167f455ka42344c30a3293a8@mail.gmail.com>
References: <430f10bb0904252137y7cacd71r246187dac419484 AT mail DOT gmail DOT com> <430f10bb0904252241w6167f455ka42344c30a3293a8 AT mail DOT gmail DOT com>
Date: Mon, 27 Apr 2009 22:15:43 +0200
Message-ID: <6910a60904271315g532d2935oc1d4a67c7c42e00c@mail.gmail.com>
Subject: Re: perl -r says readable dir is unreadable
From: Reini Urban <rurban AT x-ray DOT at>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
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

2009/4/26 Mikel Ward:
> Sorry.
>
> Found this
> http://sourceware.org/ml/cygwin/2005-03/msg00488.html
>
> Apparently it's been an issue since at least Perl 5.8.6 in 2005, but
> probably longer.

Oops. I'll to fix that and get it into perl core.
Right now I'm on a business trip in Berlin, so it will need some days.
But it will be in the next perl for cygwin-1.7 (if I can reproduce it).

> On Sun, Apr 26, 2009 at 2:37 PM, Mikel Ward  wrote:
>> Hi
>>
>> I'm having problems with a Perl script that works fine on Linux.
>>
>> The key is that the -r (file is readable) operator returns false for
>> directories that I CAN read. =A0"test" and "ls" prove that I can read
>> them.
>>
>> Something that might be related is that C:, C:\Windows, and others are
>> owned by the "TrustedInstaller" user, which mkpasswd can't handle.
>> http://www.nabble.com/group-%3D-(2**32-1)-%3D-4294967295-td20319853.html
>>
>> I use / as my Cygwin prefix rather than /cygdrive, but I've tried
>> /cygdrive and it gives the same results.
>>
>> I'm running as myself, but running as Administrator also gives the same =
results.
>>
>> I'm running Vista.
>>
>> $ test -r /c/WINDOWS && echo "/c/WINDOWS is readable"
>> /c/WINDOWS is readable
>>
>> $ cat ~/bin/readable
>> #!/usr/bin/perl
>>
>> if (-r $ARGV[0]) {
>> =A0 =A0 =A0 =A0print $ARGV[0] . " is readable\n";
>> =A0 =A0 =A0 =A0exit 0;
>> }
>> else {
>> =A0 =A0 =A0 =A0print $ARGV[0] . " IS NOT readable\n";
>> =A0 =A0 =A0 =A0exit 1;
>> }
>>
>> $ ~/bin/readable /c/WINDOWS
>> /c/WINDOWS IS NOT readable
>>
>> $ cat ~/bin/pstat
>> #!/usr/bin/perl
>>
>> ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blks=
ize,$blocks)
>> =3D stat($ARGV[0]);
>> print "mode =3D " . $mode . "\n";
>>
>> $ ~/bin/pstat /c/WINDOWS
>> mode =3D 16888
>>
>> $ ls -l /c/WINDOWS | head
>> ls: /c/WINDOWS/bthservsdp.dat: Permission denied
>> ls: /c/WINDOWS/DUMP4352.tmp: Permission denied
>> ls: /c/WINDOWS/LiveKernelReports: Permission denied
>> ls: /c/WINDOWS/MEMORY.DMP: Permission denied
>> ls: /c/WINDOWS/ModemLogs: Permission denied
>> ls: /c/WINDOWS/Prefetch: Permission denied
>> ls: /c/WINDOWS/Temp: Permission denied
>> total 505455
>> -rwx------+ =A0 =A01 Administrators None =A0 =A0 =A0 =A0 =A0 =A0 0 Jan =
=A02 10:58 AS_Debug.txt*
>> drwxrwx---+ =A0 =A04 ???????? =A0 =A0 =A0 ???????? =A0 =A0 =A04096 Apr 1=
5 07:30 AppPatch/
>> drwxrwx---+ =A0 =A06 ???????? =A0 =A0 =A0 ???????? =A0 =A0 =A0 =A0 0 Nov=
 23 13:52 Boot/
>> drwxrwx---+ =A0 =A04 ???????? =A0 =A0 =A0 ???????? =A0 =A0 =A0 =A0 0 Nov=
 =A02 =A02006 Branding/
>> drwx------+ =A0 =A02 Administrators ???????? =A0 =A0 49152 Nov =A02 =A02=
006 Cursors/
>> -rwx------+ =A0 =A01 Administrators None =A0 =A0 =A0 =A0 =A01171 Jan =A0=
6 22:34 DIFx.log*
>> -rwx------+ =A0 =A01 Administrators None =A0 =A0 =A0 =A0319456 Jan =A02 =
10:59 DIFxAPI.dll*
>> -rwx------+ =A0 =A01 SYSTEM =A0 =A0 =A0 =A0 SYSTEM =A0 =A0 =A0 17932 Jan=
 =A06 23:13 DPINST.LOG*
>> ---------- =A0 =A0 1 ???????? =A0 =A0 =A0 ???????? 212167315 Nov 20 22:5=
1 DUMP4352.tmp
>>
>> $ perl -version
>>
>> This is perl, v5.10.0 built for cygwin-thread-multi-64int
>> (with 6 registered patches, see perl -V for more detail)
--=20
Reini Urban
http://phpwiki.org/              http://murbreak.at/

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