Bug #43817 [Asn->Opn]: opendir() fails on Windows directories with parent directory unaccessible

From: Date: Tue, 24 Oct 2017 07:37:00 +0000
Subject: Bug #43817 [Asn->Opn]: opendir() fails on Windows directories with parent directory unaccessible
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-212121@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=43817&edit=1

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



Previous Comments:
------------------------------------------------------------------------
[2016-12-28 04:02:12] kthprog at gmail dot com

I have the same problems. PHP 7.1 NTS on IIS ...10? Running Windows 10. The workaround appending a
subdir + .. worked for me.

------------------------------------------------------------------------
[2016-11-08 11:03:24] knagis at miga dot lv

I have the same problem on Windows Server 2012 R2 and both PHP 5.6.24 and PHP 7.0.9. In my case the
DirectoryIterator::__construct was failing with Access is denied. (code: 5)

------------------------------------------------------------------------
[2015-01-22 19:13:44] scott at phphq dot net

This bug still exists in php 5.4.36. win32 - Windows Server 2003, iis6. I can readfile, chdir but if
I try to read the files (scandir, opendir, DirectoryIterator) I get an access denied error.

C:/Website/ -- Not accessible
C:/Website/public_html  -- Accessible
C:/Website/public_html/etc...  -- Accessible

User has correct permission to C:/Website but no permissions for access on C:/.

------------------------------------------------------------------------
[2013-03-05 12:12:50] pajoye@php.net

@mindless at mindless999 dot net

That's correct, I forgot to add this info to this bug report (present in another 
one). It is required to allow the underlying Windows API to get through the 
directories while it won't allow the user to access it.

------------------------------------------------------------------------
[2013-03-05 12:08:05] mindless at mindless999 dot net

Issue still exists in 5.3.22

Workaround is to give the user under which the website is running (advanced) "list folder /
read data" permissions on the parent folder.
this is the only permission required.

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


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


Thread (35 messages)

« previous php.bugs (#212121) next »