IIS 7 / PHP 5.3.6访问网络文件时权限被拒绝 [英] IIS 7 / PHP 5.3.6 Permission denied when accessing network file

查看:115
本文介绍了IIS 7 / PHP 5.3.6访问网络文件时权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ServerA-> 64位Windows 2008(IIS 7&& PHP 5.3.6)

ServerA-> 64 Bit Windows 2008 (IIS 7 && PHP 5.3.6)

ServerB-> 32位Windows 2003(文件服务器)

ServerB-> 32 Bit Windows 2003 (Fileserver)

我正在尝试通过在ServerA上托管的站点fopen访问\ServerB \directory1 \directory2 \ file.abc,并且我收到了Permission Denied错误。这是使用默认应用程序池的默认网站。

I'm trying to access a \ServerB\directory1\directory2\file.abc via fopen through a site hosted on ServerA and am getting a Permission Denied error. It's the default website using the default application pool.

我尝试将以下帐户或组中的AD完全权限授予目录(并通过继承文件)它仍然给出了错误:

What I've tried giving the following accounts or groups in the AD full permissions to the directory (and file through inheritance) and it still gave the error:


  • 手动创建了一个IUSR_SERVERA帐户(之前不存在)

  • IIS_WPG

  • 所有人

  • 网络服务

  • 匿名访问

  • 经过身份验证的用户

  • manually created a IUSR_SERVERA account (it didn't previously exist)
  • IIS_WPG
  • Everyone
  • Network Service
  • Anonymous Access
  • Authenticated Users

DefaultAppPool的标识是NetworkService,启用了32位应用程序。

The Identity for the DefaultAppPool is NetworkService and has 32 bit applications enabled.

IUSR_SERVERA拥有本地php目录的完全权限。

IUSR_SERVERA has full permissions to the local php directory.

任何帮助表示赞赏。我通过将本地需要的文件复制到SERVERA的wwwroot文件夹暂时解决了这个问题,但这根本不是一个永久的解决方案。

Any help is appreciated. I've temporarily solved the issue by copying the file needed locally to SERVERA's wwwroot folder, but that can't be a permanent solution at all.

谢谢

-Mike

推荐答案

感谢ProcMon的建议,它给我带来了答案。我没有正确设置默认应用程序。

Thanks for the ProcMon suggestion, it brought me to the answer. I didn't set up the default application correctly.

我阅读并重读了我能找到的所有内容,但没有特别说明:

I read and re-read everything I could find, but nothing said this specificially:

如果您需要通过IIS 7使用PHP访问网络文件,请在您正在使用的网站的应用程序默认值中设置具有适当凭据的帐户。

要执行此操作,请进入IIS管理器

To do so, go into the IIS Manager


  1. 从连接面板中选择您的站点

  2. 单击操作窗格(屏幕最右侧)中的查看应用程序链接。

  3. 在新屏幕的操作窗格中单击设置应用程序默认值

  4. 从应用程序池部分选择DefaultAppPool

  5. 在物理路径凭证部分输入正确的凭据

  1. Select your site from the Connections pane
  2. Click the View Applications link in the Actions pane (far right side of the screen)
  3. Click Set Application Defaults in the Actions pane in the new screen
  4. Choose DefaultAppPool from the Application Pool section
  5. Enter proper credentials in the Physical Path credentials section

知道更改过程模型 - >默认应用程序池的高级设置中的身份对允许它发生没有影响。

Know that changing the Process Model -> Identity in the Advanced Settings of the Default App Pool had no effect on allowing it to happen.

这篇关于IIS 7 / PHP 5.3.6访问网络文件时权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆