简体   繁体   English

shared.network 文件夹上的 fopen() 权限被拒绝错误

[英]fopen() permission denied error on shared network folder

I recently moved to a new dev PC from my old machine.我最近从我的旧机器搬到了一台新的开发电脑。 Both were running my app using a WAMP installation.两者都使用 WAMP 安装运行我的应用程序。 I am administrator for both.我是两者的管理员。 My app needs to read and write to a shared.network folder.我的应用程序需要读取和写入 shared.network 文件夹。 For some reason I am getting a permission denied error on the new machine only .出于某种原因,我只在新机器上收到权限被拒绝的错误。

Warning (2): fopen(\\Win7Pro\TSXWork\test.txt) [function.fopen]: failed to open stream: Permission denied

The shared.network drive gives full control for ' Anonymous ' and ' Everyone '. shared.network 驱动器为“ Anonymous ”和“ Everyone ”提供完全控制 I can view it on the.network, add and remove files etc using explorer, but fopen() in my CakePHP app will not work.我可以在 .network 上查看它,使用资源管理器添加和删除文件等,但我的 CakePHP 应用程序中的 fopen() 将不起作用。 With my security settings so loose on the shared folder, why would my new PC not have permission?由于我在共享文件夹上的安全设置如此宽松,为什么我的新 PC 没有权限?

If you are using WAMP and nothing worked, for me the problem was solved using XAMPP.如果您使用的是 WAMP 但没有任何效果,对我来说,问题是使用 XAMPP 解决的。

Cake will be running under the webserver's permissions. Cake将在网络服务器的权限下运行。 Even if the share itself has everyone:read, you still need to grant the IIS user account access rights to the underlying directories that are being shared. 即使共享本身具有“所有人:已读”,您仍需要向IIS用户帐户授予对正在共享的基础目录的访问权限。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM