Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an apache 2.2 server running Django. We have a network drive T: which we need constant access to within our Django app. When running Apache as a service, we cannot access this drive, as far as any django code is concerned the drive does not exist.

If I add...

<Directory "t:/">
       Options Indexes FollowSymLinks MultiViews
       AllowOverride None
       Order allow,deny
       allow from all

to the httpd.conf file the service no longer runs, but I can start apache as a console and it works fine, Django can find the network drive and all is well.

Why is there a difference between the console and the service? Should there be a difference? I have the service using my own log on so in theory it should have the same access as I do.

I'm keen to keep it running as a service as it's far less obtrusive when I'm working on the server (unless there's a way to hide the console?). Any help would be most appreciated.

share|improve this question
Is there a way to determine which user apache is running as outside of the task manager or windows services screen? I have a feeling it's running as the local system despite what windows is reporting. – danspants Jun 3 '10 at 0:22

I see that you're using Windows. Mapped drives are user based on Windows: they need an interactive user. It works "from the console" because you are logged in. The drive is not available to the service to when starting. I don't know if this will work, but try to change the settins of the service to run under your user. See if that helps.

You may also try to use AutoExNT service to run a batch file before login, something along the lines of

net use T: \\host\share_name /PERSISTENT:YES

The mapped drive may be in the context of the System account so when you login you may not be able to see the mapped drive when you login from a normal session.

I work mostly on Linux. I think some more advanced windows admins can come up with something to improve on this or give you a full recipe.

share|improve this answer
Yep, it's already logged in as me which is one of the reason's i find it so strange. – danspants Jun 2 '10 at 5:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.