Bug #52376 [Com]: opendir() cannot open UNC paths in IIS7 using passthrough auth.
| From: | mike dot riendeau at gmail dot com | Date: | Wed, 08 Feb 2012 19:37:33 +0000 |
| Subject: | Bug #52376 [Com]: opendir() cannot open UNC paths in IIS7 using passthrough auth. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-167311@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=52376&edit=1
ID: 52376
Comment by: mike dot riendeau at gmail dot com
Reported by: ryan at kisc dot edu dot np
Summary: opendir() cannot open UNC paths in IIS7 using
passthrough auth.
Status: Assigned
Type: Bug
Package: *Directory/Filesystem functions
Operating System: win64 - W2008R2
PHP Version: 5.3.2
Assigned To: pajoye
Block user comment: N
Private report: N
New Comment:
I fixed this in Win7 IIS7 Through the inetmgr.
WebSite->Authentication->Anonymous Authentication (edit on side panel)
I changed the Specific User (IUSR) to Application pool identity.
I am only using it for local development, so I'm not sure how this affects security.
Previous Comments:
------------------------------------------------------------------------
[2011-10-13 09:57:29] em at ducommun dot ch
I have exactly the same problem.
I have tried to map the share to a letter, exemple Z:/ same result.
This is not a permissions problem.
Please help.
Config: xampp running under w2k3r2 server, with php 5.3.5
Thanks!
------------------------------------------------------------------------
[2011-08-05 15:14:58] marc dot seitz at ww-informatik dot de
Hi Guys,
we have exactly the same problem now.
We want to migrate to Windows Server 2008 R2 with IIS 7.5, FastCGI, PHP 5.3.6.
When I try to do a file_get_contents(<UNC-PATH>) or opendir(<UNC-PATH>) I always will
get the error:
Warning: fopen(<UNC-PATH-TO-FILE>): failed to open stream: Permission denied in
D:\inetpub\wwwroot\XXX.php on line 26
The Application-Pools of the IIS are running under a Domain-Account which has access to the Network
Share.
I don't know how to solve this problem.
Any ideas of you?
Thanks
Marc
------------------------------------------------------------------------
[2011-01-13 04:24:50] mark at internode dot on dot net
Hi I am having the same problem with PHP 5.3.5 running under IIS 7.5, FastCGI, Windows Server 2008
R2 where I am simply trying to access a file on another server using a UNC path.
$uploadfile = "\\<server>\<share>\<folder>\<file>.txt";
$fh = fopen($uploadfile, 'r') or die("Can't open file $uploadfile");
I have tried granting "everyone" full permissions for the share and the file system but it
still does not work.
This code works perfectly if the file is stored on the same server and is accessed through a local
path.
Other things I have tried inlcude:
- setting the defaultappool to use a specific user and granting that user permissions on the share
and file system
- using "network" as above
Any other ideas on this one?
------------------------------------------------------------------------
[2010-07-20 04:42:43] aharvey@php.net
(Restoring status.)
As a fellow Chrome user, I feel your pain. :)
------------------------------------------------------------------------
[2010-07-20 04:08:58] ryan at kisc dot edu dot np
sorry about the line breaks, apparently this site doesn't like what Chrome does when I resize
the text box. I'll be more careful in the future. Actually this site seems to hate Chrome
altogether.
I keep getting "incorrect username" constantly. The bug site is buggy, at least in Chrome.
------------------------------------------------------------------------
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=52376
--
Edit this bug report at https://bugs.php.net/bug.php?id=52376&edit=1