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?

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

3 Answers

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

link|improve this answer
feedback

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.

link|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
feedback

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".

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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