Mail Archives: cygwin/2009/04/27/16:16:03
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 -