Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an Apache Webserver service running on Machine A.

It serves some files from machine B, by having an

Alias /foo \machineB\someshare

MachineB\someshare is read-accessible to "Everyone". Apache runs as LocalService.

When I boot the machine, it isn't able to serve files from /foo, but If i log onto the machine, and just touch the \machineB\someshare it looks like access is granted, and it correctly serves files from /foo.

How do I automate this, so I don't need to log in and touch the network share?

share|improve this question
    
Forgot to say both servers are win 2k8r2 –  Soraz Jun 8 '11 at 18:05
add comment

3 Answers

Try running Apache as a domain user service account, with necessary privileges of course, and see where that gets you.

share|improve this answer
add comment

one possibility - have the web server mount the remote share via cifs in the fstab? You'll have to supply credentials, but they can be guest creds I believe. Alternately a startup script that mounts and unmounts might have the same effect.

share|improve this answer
    
that would work, but he didn't state if machine A was running windows or not –  SpacemanSpiff Jun 8 '11 at 17:41
add comment

If I remember correctly, starting with Windows Vista, the security group "Everyone" does not include "anonymous" logins. When accessing a remote share using a service that is running as "LocalService" it accesses using a NULL user, or anonymous, so it won't be able to access the remote share.

As SpacemanSpiff recommended, change apache to run as a domain user, or try using "NetworkService" instead of "LocalService".

share|improve this answer
add comment

Your Answer

 
discard

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.