Edit report at https://bugs.php.net/bug.php?id=43817&edit=1

 ID:                 43817
 Comment by:         d at hp23c dot dk
 Reported by:        losd at mail dot dk
 Summary:            opendir() fails on Windows directories with parent
                     directory unaccessible
 Status:             Assigned
 Type:               Bug
 Package:            Directory function related
 Operating System:   win32 only - Windows Server 2003
 PHP Version:        5.3.0beta1
 Assigned To:        pajoye
 Block user comment: N
 Private report:     N

 New Comment:

In Windows, it _does not matter_ if it is C:\fOo or c:\foo. If you do not 
lowercase (or uppercase, or whatever) to compare, it is a bug.


Previous Comments:
------------------------------------------------------------------------
[2013-01-14 11:26:46] paj...@php.net

Ok, the actual issue is about setting the right permissions.

It is possible to block read&write and other operations but the read of the 
attribute of a given path must be allowed. It is used by almost all file 
functions    (Find*, GetLong/ShortPathName, etc.). 

Without the permissions allowing to read attributes, we won't be able to fetch 
the actual name (ie: c:\Foo is given but the actual name is c:\fOo). We used 
the 
actual to store it in the real cache and avoid to have to lower case all paths 
before each file operation.

Can you try to set the perms correctly and tell me if it works out for you? 
Should work on any windows supported version.

------------------------------------------------------------------------
[2013-01-10 12:34:52] paj...@php.net

Quick notice to help to understand the problem describe here:

The main problem here is that FindFirstFile requires access to all elements of 
a 
given path, which is not the case here.

To work around this limitation while keeping the realpath cache working nicely 
is 
not that easy.

------------------------------------------------------------------------
[2012-10-18 11:49:00] y dot korotia at hotmail dot com

are you going to fix it for Windows or not?

I've wasted about 4 hours because of this bug!

installed ZendServer with 5.3x

To access folder I must give access to its parent. what a f..?

------------------------------------------------------------------------
[2012-07-18 06:53:55] denis at morozov dot tk

W2008R2x64+PHP5.3.8.: have got the same error+
In my case is_dir() is not affected,
but opendir() fails.
Directory is in the root of system disk, directories inside wwwroot are not 
affected.
If started from CMD with Admin - no error, error comes only in case of IUSR-IIS 
calls.
IN:
$dir="E:\\temp\\";
$dh=opendir($dir);
OUT:
PHP Warning:  opendir(E:\temp\,E:\temp\) [<a 
href='function.opendir'>function.opendir</a>]: Отказано в 
доступе. (code: 5) in E:\inetpub\dm\iPrinter\dir.php

------------------------------------------------------------------------
[2011-02-01 22:42:03] asankel at yahoo dot com

UPDATE: This problem does not occur with php-5.2.17-nts-Win32-VC6-x86 so you 
can use it as a workaround.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=43817


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=43817&edit=1

Reply via email to