Apache mapped drive

This is a discussion on Apache mapped drive within the Apache Web Server forums, part of the Web Server and Related Forums category; Hello, I have installed a server Apache 2.2 in windows xp. I want Apache to access a map drive ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-19-2007
naima.mans@gmail.com
 
Posts: n/a
Default Apache mapped drive

Hello,

I have installed a server Apache 2.2 in windows xp.

I want Apache to access a map drive s:\ (write / read) BUT it cannot
acces the drive S:

it says " No such file or directory" (I try it with a Python script)

I have run apache as a windows service, Log on with my account (i have
acces to the drive S:)

ps: i can't use UNC path , i need to use S:\ only :(


thanks a lot

  #2 (permalink)  
Old 02-20-2007
shimmyshack
 
Posts: n/a
Default Re: Apache mapped drive

On 19 Feb, 14:49, naima.m...@gmail.com wrote:
> Hello,
>
> I have installed a server Apache 2.2 in windows xp.
>
> I want Apache to access a map drive s:\ (write / read) BUT it cannot
> acces the drive S:
>
> it says " No such file or directory" (I try it with a Python script)
>
> I have run apache as a windows service, Log on with my account (i have
> acces to the drive S:)
>
> ps: i can't use UNC path , i need to use S:\ only :(
>
> thanks a lot


First make sure you've set up your apache user correctly, (if it is
running as you fair enough but perhaps thats a little too much)
then set up an alias for the vhost you are using, or serverwide if you
cant do that
use a UNC path for this! (if you can't I can't help you)

Here's what worked for me - so that for the test vhost I used, going
to
http://text.vhost/2k3 sent me to the 2k3 box on my network (ip:
192.168.100.11), which is mapped to Z:\ on the machine apache is
running

Alias /2k3 //192.168.100.11/2k3
<Directory "//192.168.100.11/2k3">
Order Deny,Allow
# Options +Indexes
</Directory>

Options line just lets you see the listing while debuggering.

Now Apache can see that directory, how you then access it in your
scripts is dependent on how your scripts are running, I would have
thought you would better off using an apache module.

You can certainly access files on the mapped drive via
<?php readfile( 'http://test.vhost/2k3/' ); ?>

however I am not sure if you can access them using Z:\
and I didn't test includes and so...
one word of warning though - it's in the docs in many places that you
should use forward slashes depsite the fact that you are on windows.

The speed for me via 54Mbit/s wireless network using two old boxes was
1.7MB/s

  #3 (permalink)  
Old 02-20-2007
naima.mans@gmail.com
 
Posts: n/a
Default Re: Apache mapped drive

On 20 fév, 04:01, "shimmyshack" <matt.fa...@gmail.com> wrote:
> On 19 Feb, 14:49, naima.m...@gmail.com wrote:
>
> > Hello,

>
> > I have installed a server Apache 2.2 in windows xp.

>
> > I want Apache to access a map drive s:\ (write / read) BUT it cannot
> > acces the drive S:

>
> > it says " No such file or directory" (I try it with a Python script)

>
> > I have run apache as a windows service, Log on with my account (i have
> > acces to the drive S:)

>
> > ps: i can't use UNC path , i need to use S:\ only :(

>
> > thanks a lot

>
> First make sure you've set up your apache user correctly, (if it is
> running as you fair enough but perhaps thats a little too much)
> then set up an alias for the vhost you are using, or serverwide if you
> cant do that
> use a UNC path for this! (if you can't I can't help you)
>
> Here's what worked for me - so that for the test vhost I used, going
> tohttp://text.vhost/2k3sent me to the 2k3 box on my network (ip:
> 192.168.100.11), which is mapped to Z:\ on the machine apache is
> running
>
> Alias /2k3 //192.168.100.11/2k3
> <Directory "//192.168.100.11/2k3">
> Order Deny,Allow
> # Options +Indexes
> </Directory>
>
> Options line just lets you see the listing while debuggering.
>
> Now Apache can see that directory, how you then access it in your
> scripts is dependent on how your scripts are running, I would have
> thought you would better off using an apache module.
>
> You can certainly access files on the mapped drive via
> <?php readfile( 'http://test.vhost/2k3/'); ?>
>
> however I am not sure if you can access them using Z:\
> and I didn't test includes and so...
> one word of warning though - it's in the docs in many places that you
> should use forward slashes depsite the fact that you are on windows.
>
> The speed for me via 54Mbit/s wireless network using two old boxes was
> 1.7MB/s


hello

thanks for your answer

the problem is that i'm not calling the S:\ drive directly.. i call a
build script which read values on the S:\ drive
when i run Apache in console application it works (it does'nt as a
service)

i have read lot of article and it doesn't seems to be possible to read
a mapped drive with apache... is there another server web which can do
this ans support python?

thanks again




  #4 (permalink)  
Old 02-20-2007
shimmyshack
 
Posts: n/a
Default Re: Apache mapped drive

On 20 Feb, 14:50, naima.m...@gmail.com wrote:
> On 20 fév, 04:01, "shimmyshack" <matt.fa...@gmail.com> wrote:
>
>
>
> > On 19 Feb, 14:49, naima.m...@gmail.com wrote:

>
> > > Hello,

>
> > > I have installed a server Apache 2.2 in windows xp.

>
> > > I want Apache to access a map drive s:\ (write / read) BUT it cannot
> > > acces the drive S:

>
> > > it says " No such file or directory" (I try it with a Python script)

>
> > > I have run apache as a windows service, Log on with my account (i have
> > > acces to the drive S:)

>
> > > ps: i can't use UNC path , i need to use S:\ only :(

>
> > > thanks a lot

>
> > First make sure you've set up your apache user correctly, (if it is
> > running as you fair enough but perhaps thats a little too much)
> > then set up an alias for the vhost you are using, or serverwide if you
> > cant do that
> > use a UNC path for this! (if you can't I can't help you)

>
> > Here's what worked for me - so that for the test vhost I used, going
> > tohttp://text.vhost/2k3sentme to the 2k3 box on my network (ip:
> > 192.168.100.11), which is mapped to Z:\ on the machine apache is
> > running

>
> > Alias /2k3 //192.168.100.11/2k3
> > <Directory "//192.168.100.11/2k3">
> > Order Deny,Allow
> > # Options +Indexes
> > </Directory>

>
> > Options line just lets you see the listing while debuggering.

>
> > Now Apache can see that directory, how you then access it in your
> > scripts is dependent on how your scripts are running, I would have
> > thought you would better off using an apache module.

>
> > You can certainly access files on the mapped drive via
> > <?php readfile( 'http://test.vhost/2k3/');?>

>
> > however I am not sure if you can access them using Z:\
> > and I didn't test includes and so...
> > one word of warning though - it's in the docs in many places that you
> > should use forward slashes depsite the fact that you are on windows.

>
> > The speed for me via 54Mbit/s wireless network using two old boxes was
> > 1.7MB/s

>
> hello
>
> thanks for your answer
>
> the problem is that i'm not calling the S:\ drive directly.. i call a
> build script which read values on the S:\ drive
> when i run Apache in console application it works (it does'nt as a
> service)
>
> i have read lot of article and it doesn't seems to be possible to read
> a mapped drive with apache... is there another server web which can do
> this ans support python?
>
> thanks again


grant apache the right to run that program
start run dcomcnfg.exe
find the program you need apache to run in component services .. look
around,
click properties, security, config permissions customise, edit
permissions, add, users, show users, select apache user and add

it sounds like a permissions issue if it works from the console but
not as a service (I am assuming it runs as its own user, not as SYSTEM
- which has limited network rights)


  #5 (permalink)  
Old 02-21-2007
naima.mans@gmail.com
 
Posts: n/a
Default Re: Apache mapped drive

On 20 fév, 16:55, "shimmyshack" <matt.fa...@gmail.com> wrote:
> On 20 Feb, 14:50, naima.m...@gmail.com wrote:
>
>
>
>
>
> > On 20 fév, 04:01, "shimmyshack" <matt.fa...@gmail.com> wrote:

>
> > > On 19 Feb, 14:49, naima.m...@gmail.com wrote:

>
> > > > Hello,

>
> > > > I have installed a server Apache 2.2 in windows xp.

>
> > > > I want Apache to access a map drive s:\ (write / read) BUT it cannot
> > > > acces the drive S:

>
> > > > it says " No such file or directory" (I try it with a Python script)

>
> > > > I have run apache as a windows service, Log on with my account (i have
> > > > acces to the drive S:)

>
> > > > ps: i can't use UNC path , i need to use S:\ only :(

>
> > > > thanks a lot

>
> > > First make sure you've set up your apache user correctly, (if it is
> > > running as you fair enough but perhaps thats a little too much)
> > > then set up an alias for the vhost you are using, or serverwide if you
> > > cant do that
> > > use a UNC path for this! (if you can't I can't help you)

>
> > > Here's what worked for me - so that for the test vhost I used, going
> > > tohttp://text.vhost/2k3sentmeto the 2k3 box on my network (ip:
> > > 192.168.100.11), which is mapped to Z:\ on the machine apache is
> > > running

>
> > > Alias /2k3 //192.168.100.11/2k3
> > > <Directory "//192.168.100.11/2k3">
> > > Order Deny,Allow
> > > # Options +Indexes
> > > </Directory>

>
> > > Options line just lets you see the listing while debuggering.

>
> > > Now Apache can see that directory, how you then access it in your
> > > scripts is dependent on how your scripts are running, I would have
> > > thought you would better off using an apache module.

>
> > > You can certainly access files on the mapped drive via
> > > <?php readfile( 'http://test.vhost/2k3/');?>

>
> > > however I am not sure if you can access them using Z:\
> > > and I didn't test includes and so...
> > > one word of warning though - it's in the docs in many places that you
> > > should use forward slashes depsite the fact that you are on windows.

>
> > > The speed for me via 54Mbit/s wireless network using two old boxes was
> > > 1.7MB/s

>
> > hello

>
> > thanks for your answer

>
> > the problem is that i'm not calling the S:\ drive directly.. i call a
> > build script which read values on the S:\ drive
> > when i run Apache in console application it works (it does'nt as a
> > service)

>
> > i have read lot of article and it doesn't seems to be possible to read
> > a mapped drive with apache... is there another server web which can do
> > this ans support python?

>
> > thanks again

>
> grant apache the right to run that program
> start run dcomcnfg.exe
> find the program you need apache to run in component services .. look
> around,
> click properties, security, config permissions customise, edit
> permissions, add, users, show users, select apache user and add
>
> it sounds like a permissions issue if it works from the console but
> not as a service (I am assuming it runs as its own user, not as SYSTEM
> - which has limited network rights)- Masquer le texte des messages précédents -
>
> - Afficher le texte des messages précédents -


Hello

thanks again.. :)

there 's no program I want Apache to run.. i juste want him to see a
mapped drive S which is called by an external program (msdev Visual
studio ) (nevertheless i have give to the apache user the right to run
Visual like you discribe up)

When i called msdev (Visual build module) it work until it arrives at
a point where Msdev read the mapped drive S, then it failed and says:
C:\AcrCalculator\JNIWrapping.h(2) : fatal error C1083: Cannot open
include file: 'jni.h': No such file or directory

because this include file is in the mapped drive S...

then i have test the read and write right to this mapped drive (with a
little script) and see that Apache haven't got them... so i deduce
that my Build problem result of this... :'(

thanks a lot

  #6 (permalink)  
Old 02-21-2007
naima.mans@gmail.com
 
Posts: n/a
Default Re: Apache mapped drive

On 21 fév, 11:51, naima.m...@gmail.com wrote:
> On 20 fév, 16:55, "shimmyshack" <matt.fa...@gmail.com> wrote:
>
>
>
>
>
> > On 20 Feb, 14:50, naima.m...@gmail.com wrote:

>
> > > On 20 fév, 04:01, "shimmyshack" <matt.fa...@gmail.com> wrote:

>
> > > > On 19 Feb, 14:49, naima.m...@gmail.com wrote:

>
> > > > > Hello,

>
> > > > > I have installed a server Apache 2.2 in windows xp.

>
> > > > > I want Apache to access a map drive s:\ (write / read) BUT it cannot
> > > > > acces the drive S:

>
> > > > > it says " No such file or directory" (I try it with a Python script)

>
> > > > > I have run apache as a windows service, Log on with my account (ihave
> > > > > acces to the drive S:)

>
> > > > > ps: i can't use UNC path , i need to use S:\ only :(

>
> > > > > thanks a lot

>
> > > > First make sure you've set up your apache user correctly, (if it is
> > > > running as you fair enough but perhaps thats a little too much)
> > > > then set up an alias for the vhost you are using, or serverwide if you
> > > > cant do that
> > > > use a UNC path for this! (if you can't I can't help you)

>
> > > > Here's what worked for me - so that for the test vhost I used, going
> > > > tohttp://text.vhost/2k3sentmetothe 2k3 box on my network (ip:
> > > > 192.168.100.11), which is mapped to Z:\ on the machine apache is
> > > > running

>
> > > > Alias /2k3 //192.168.100.11/2k3
> > > > <Directory "//192.168.100.11/2k3">
> > > > Order Deny,Allow
> > > > # Options +Indexes
> > > > </Directory>

>
> > > > Options line just lets you see the listing while debuggering.

>
> > > > Now Apache can see that directory, how you then access it in your
> > > > scripts is dependent on how your scripts are running, I would have
> > > > thought you would better off using an apache module.

>
> > > > You can certainly access files on the mapped drive via
> > > > <?php readfile( 'http://test.vhost/2k3/');?>

>
> > > > however I am not sure if you can access them using Z:\
> > > > and I didn't test includes and so...
> > > > one word of warning though - it's in the docs in many places that you
> > > > should use forward slashes depsite the fact that you are on windows.

>
> > > > The speed for me via 54Mbit/s wireless network using two old boxes was
> > > > 1.7MB/s

>
> > > hello

>
> > > thanks for your answer

>
> > > the problem is that i'm not calling the S:\ drive directly.. i call a
> > > build script which read values on the S:\ drive
> > > when i run Apache in console application it works (it does'nt as a
> > > service)

>
> > > i have read lot of article and it doesn't seems to be possible to read
> > > a mapped drive with apache... is there another server web which can do
> > > this ans support python?

>
> > > thanks again

>
> > grant apache the right to run that program
> > start run dcomcnfg.exe
> > find the program you need apache to run in component services .. look
> > around,
> > click properties, security, config permissions customise, edit
> > permissions, add, users, show users, select apache user and add

>
> > it sounds like a permissions issue if it works from the console but
> > not as a service (I am assuming it runs as its own user, not as SYSTEM
> > - which has limited network rights)- Masquer le texte des messages précédents -

>
> > - Afficher le texte des messages précédents -

>
> Hello
>
> thanks again.. :)
>
> there 's no program I want Apache to run.. i juste want him to see a
> mapped drive S which is called by an external program (msdev Visual
> studio ) (nevertheless i have give to the apache user the right to run
> Visual like you discribe up)
>
> When i called msdev (Visual build module) it work until it arrives at
> a point where Msdev read the mapped drive S, then it failed and says:
> C:\AcrCalculator\JNIWrapping.h(2) : fatal error C1083: Cannot open
> include file: 'jni.h': No such file or directory
>
> because this include file is in the mapped drive S...
>
> then i have test the read and write right to this mapped drive (with a
> little script) and see that Apache haven't got them... so i deduce
> that my Build problem result of this... :'(
>
> thanks a lot- Masquer le texte des messages précédents -
>
> - Afficher le texte des messages précédents -


re hello

it seems to be a problem of services..

when i run a script under windows service it doesn't see the mapped
drive...

even if it's the same user that start the service...

  #7 (permalink)  
Old 02-21-2007
David Kerber
 
Posts: n/a
Default Re: Apache mapped drive

In article <1172067928.826834.177540@k78g2000cwa.googlegroups .com>,
naima.mans@gmail.com says...

....

> it seems to be a problem of services..
>
> when i run a script under windows service it doesn't see the mapped
> drive...
>
> even if it's the same user that start the service...


That's correct. Unless you specify otherwise in the service properties,
services run under the localsystem account, which has no access to
network services. If you specify the service to run under a regular
user's account (or one specifically set up with the needed permissions),
then it will be able to access the network.

--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
  #8 (permalink)  
Old 02-21-2007
naima.mans@gmail.com
 
Posts: n/a
Default Re: Apache mapped drive

On 21 fév, 15:59, David Kerber
<ns_dkerber@ns_WarrenRogersAssociates.com> wrote:
> In article <1172067928.826834.177...@k78g2000cwa.googlegroups .com>,
> naima.m...@gmail.com says...
>
> ...
>
> > it seems to be a problem of services..

>
> > when i run a script under windows service it doesn't see the mapped
> > drive...

>
> > even if it's the same user that start the service...

>
> That's correct. Unless you specify otherwise in the service properties,
> services run under the localsystem account, which has no access to
> network services. If you specify the service to run under a regular
> user's account (or one specifically set up with the needed permissions),
> then it will be able to access the network.
>
> --
> Remove the ns_ from if replying by e-mail (but keep posts in the
> newsgroups if possible).


Hello

exactly... after research i found the solution in the Microsoft web
site here:
http://support.microsoft.com/kb/180362/ko#appliesto

it explains that you have to first start a service (with the local
system account) which mount the drive...
then I start another service with my script and it works.. the script
see the mapped drive .
(quote : "However, drive letters that are mapped from a service that
is running under the local System account are visible to all logon
sessions.")

to create services you can use SRVANY.exe / INSTSRV .exe (it's quite
simple)

thank to all for help



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:43 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0