Re: Accessing Network Shares and Mapped Drives
| From: | Christoph Grottolo | Date: | Fri, 19 Jul 2002 18:20:28 +0000 |
| Subject: | Re: Accessing Network Shares and Mapped Drives | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-14848@lists.php.net to get a copy of this message | ||
James McLean wrote:
> I just built a site to run on IIs5 and php 4.2.?, and it had to
> fopen() files over a network. I have had some problem with accessing
> the files over the network, and I am fairly sure, that is an issue
> with Windows users, rather than PHP etc, but just thought some of you
> fellas could help or provide some insight.
maybe...
> Now the IIS Anon user (IUSR_WEB-SERVER) has no trouble reading a file
> from any where on the local file system, (C:) but over a network no
> go. fopen() always gets permission denied.
You've got it - the user has no rights on the share, so he cannot access the
files - it's that easy. IIS uses a local user by default, so it can't access
network shares (thats not really stupid). Basically you have three possible
solutions:
- Create a domain user with exactly the same name and the same password as
IUSER_machinename
- Run IIS with a different user who has access to the network share you need
- stop using Windows
btw, if you use that server as a server (nobody logged in) should access the
share directly, not over a mapped network drive. Make shure that you check
'check that file exists' in the IIS admin panel (where you map .php files to
php.exe). IIS will then manage the permissions for php.exe.
Christoph
HIH, Christoph