Edit report at https://bugs.php.net/bug.php?id=50163&edit=1
ID: 50163
Updated by: pajoye@php.net
Reported by: be3ch at centrum dot cz
Summary: IUSR_ NTFS permissions issue on PHP 5.2.11-nts
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: Filesystem function related
Operating System: win32 only - Windows 2003 Server
PHP Version: 5.2.11
Assigned To: pajoye
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2010-10-07 19:03:15] cataphract@php.net
While chdir() requires traverse/execute permissions on the target folder (a permission that is
ignored anyway, because bypass traverse checking is enabled by default), I cannot reproduce the bug
using the CLI SAPI.
Setting the working directory to
c:\Users\Cataphract\Documents\SDK\php54dev\vc9\x86\php54-trunk\Debug_TS\teste, and running the
non-zts PHP with the script:
<?php
echo file_get_contents("./relative/file.txt");
worked perfectly. So this may be specific to the CGI SAPI.
------------------------------------------------------------------------
[2010-10-07 18:32:11] cataphract@php.net
Forgot to add. The script was this one:
<?php
var_dump(chdir('c:\Users\Cataphract\Documents\SDK\php54dev\vc9\x86\php54-trunk\Debug_TS\teste'));
echo file_get_contents("./relative/file.txt");
The permissions on [...]\Debug_TS\teste were "Read" (i.e., List Folder/Read data, Read
attributes and extended attributes, Read permissions, on the folder, subfolders and files). The
simple permission "List folder contents" is actually giving additionally the permission
Traverse Folder/execute files to the folder and subfolders.
------------------------------------------------------------------------
[2010-10-07 18:25:46] cataphract@php.net
This might be unrelated (probably it's the same issue), but I can notice a difference between
zts and non-zts on chdir.
Full Process Monitor log here:
http://nebm.ist.utl.pt/~glopes/misc/log50163.txt
The most relevant part is:
NON-ZTS:
7:16:40,4984188 php.exe 13220 CreateFile C:\Users\Cataphract\Documents\SDK\php54dev\vc9\x86\php54-trunk\Debug_TS\teste ACCESS
DENIED Desired Access: Execute/Traverse, Synchronize, Disposition: Open, Options: Directory,
Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a
ZTS:
Only a successful QueryDirectory to
C:\Users\Cataphract\Documents\SDK\php54dev\vc9\x86\php54-trunk\Debug_TS\teste
------------------------------------------------------------------------
[2010-10-07 17:56:02] saurabh0 at gmail dot com
Some additional info:
var_dump(getcwd(), realpath("."));
gives:
string(7) "c:\php5" string(7) "C:\php5"
As expected, when you give "List Folder Contents" permission (in
addition to read) to the web root folder both functions return the
correct path.
------------------------------------------------------------------------
[2010-10-07 17:54:38] cataphract@php.net
Closed bug #53011 as a duplicate as this one.
Pierre: he's using PHP 5.3.3.
------------------------------------------------------------------------
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=50163
--
Edit this bug report at https://bugs.php.net/bug.php?id=50163&edit=1