Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Script Access to UNC Drive |
|
Author |
|
ccx138
Joined: 18 Nov 2009 Posts: 1
|
Posted: Wed 18 Nov '09 17:21 Post subject: Script Access to UNC Drive |
|
|
I am trying to get Apache and php to work so that the site is hosted on a local drive but a data directory used by the php application (Moodle) is located on a net work drive. The location of the network drive is located in config.php file so Apache knows nothing about the location. I keep getting a file does not exist error in the log.
The error is the same as I would expect to see if the user/group in httpd.conf did not have read/write access to the file.
The server is a Windows server and Apache is being run as a domain user who is in the Windows Administrator group and also has read/write access to the network file.
I have tried specifying the remote file as:
\\server\dir1\dir2
//server/dir1/dir2
I have tried mapping the remote directory as a drive letter
All with the same error
I have ruled out php having any effect on this as IIS and php can access the network drive correctly. IIS has the domain user as the application pool user.
If this was a *nix system I would point at the User/Group directive was set to a user that did have access to the remote file. Is it possible to tell Apache to run as a domain user.
e.g.
User me@myhost.com
or
User myhost\me |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Fri 20 Nov '09 6:43 Post subject: |
|
|
Apache is by design a unix app. It has been ported to ther OSs over time. Not everything that can be done in unix can be done in Windows.
I'm Server 2k/0/3/8 dumb. James may be better able to answer this.
Would it be possible to run Apache as a plain Windows user that has permissions to said network drive/share outside the domain?
As such, it should then work. I do this to jail Apache to certain places on the hard drives, but I'm running XP. Apache can however then grab anything off any network share I require and allow it's group or user access to. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7355 Location: Germany, Next to Hamburg
|
Posted: Fri 20 Nov '09 18:14 Post subject: |
|
|
Well I have no Actice Directory at home. So I run for this test apache service as an local administrator.
The network share permission were set to read / write to everyone.
Code: |
Alias /test/ //server3/test_share
<Location /test/>
Options All
Order allow,deny
Allow from all
Deny from none
</Location>
|
Often there is that permission problem cause people (included myself) forget to set the internal permission from apache with the Location block in apache.
For this test I used Windows 2003 standard SP2 all updates. Apache 2.2.14
Hope that helps. |
|
Back to top |
|
|
|
|
|
|