Bug #43817 [Asn]: opendir() fails on Windows directories with parent directory unaccessible
From: pajoye@php.net Date: Tue, 05 Mar 2013 12:12:50 +0000 Subject: Bug #43817 [Asn]: opendir() fails on Windows directories with parent directory unaccessible References: 1 Groups: php.bugs Request: Send a blank email to php-bugs+get-177601@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: pajoye@php.net
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:
@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.
Previous Comments:
------------------------------------------------------------------------
[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.
------------------------------------------------------------------------
[2013-01-16 09:20:16] pajoye@php.net
It does matter. The reasons are:
1. Windows support case sensitive filesystems (in any modern versions)
2. the real path stat cache is case sensitive, for portability and performance,
by design.
However, no matter how the case is, you have to set the attributes permissions.
If it is not allowed to read the attributes, php won't be able to load that file
or path. And again, it has absolutely nothing do with case sensitive paths.
Last but not least, if you see the bug status, it is still open as a bug, but it
is about other issues caused by FindFirstFile, not the case sensitivity.
------------------------------------------------------------------------
[2013-01-16 06:42:04] d at hp23c dot dk
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.
------------------------------------------------------------------------
[2013-01-14 11:26:46] pajoye@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] pajoye@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.
------------------------------------------------------------------------
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)
- #43817 [Opn]: opendir() fails on Windows directories with parent directory unaccessible
- #43817 [Opn->Asn]: opendir() fails on Windows directories with parent directory unaccessible
- #43817 [Asn]: opendir() fails on Windows directories with parent directory unaccessible
- #43817 [Asn]: opendir() fails on Windows directories with parent directory unaccessible
- #43817 [Asn]: opendir() fails on Windows directories with parent directory unaccessible
- #43817 [Asn->Csd]: opendir() fails on Windows directories with parent directory unaccessible
- #43817 [Csd->Asn]: opendir() fails on Windows directories with parent directory unaccessible
- #43817 [Asn]: opendir() fails on Windows directories with parent directory unaccessible
- #43817 [Asn]: opendir() fails on Windows directories with parent directory unaccessible
- #43817 [Asn]: opendir() fails on Windows directories with parent directory unaccessible
- #43817 [Asn->Fbk]: opendir() fails on Windows directories with parent directory unaccessible
- #43817 [Com]: opendir() fails on Windows directories with parent directory unaccessible
- Bug #43817 [NoF->Asn]: opendir() fails on Windows directories with parent directory unaccessible
- Bug #43817 [Asn->Fbk]: opendir() fails on Windows directories with parent directory unaccessible
- Bug #43817 [Fbk->Asn]: opendir() fails on Windows directories with parent directory unaccessible
- Bug #43817 [Asn]: opendir() fails on Windows directories with parent directory unaccessible
- Bug #43817 [Asn]: opendir() fails on Windows directories with parent directory unaccessible
- Bug #43817 [Com]: opendir() fails on Windows directories with parent directory unaccessible
- Bug #43817 [Com]: opendir() fails on Windows directories with parent directory unaccessible
- Bug #43817 [Com]: opendir() fails on Windows directories with parent directory unaccessible
- Bug #43817 [Com]: opendir() fails on Windows directories with parent directory unaccessible
- Bug #43817 [Com]: opendir() fails on Windows directories with parent directory unaccessible
- Bug #43817 [Asn]: opendir() fails on Windows directories with parent directory unaccessible
- Bug #43817 [Asn]: opendir() fails on Windows directories with parent directory unaccessible
- Bug #43817 [Com]: opendir() fails on Windows directories with parent directory unaccessible
- Bug #43817 [Asn]: opendir() fails on Windows directories with parent directory unaccessible
- Bug #43817 [Com]: opendir() fails on Windows directories with parent directory unaccessible
- Bug #43817 [Asn]: opendir() fails on Windows directories with parent directory unaccessible
- Bug #43817 [Com]: opendir() fails on Windows directories with parent directory unaccessible
- Bug #43817 [Com]: opendir() fails on Windows directories with parent directory unaccessible
- Bug #43817 [Asn->Opn]: opendir() fails on Windows directories with parent directory unaccessible
- Bug #43817 [Com]: opendir() fails on Windows directories with parent directory unaccessible
- Bug #43817 [Com]: opendir() fails on Windows directories with parent directory unaccessible
- Bug #43817 [Com]: opendir() fails on Windows directories with parent directory unaccessible
| « previous | php.bugs (#177601) | next » |
|---|