Super User is a question and answer site for computer enthusiasts and power users. 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 a remote directory that a web application accesses via a UNC path e.g. \\192.168.0.42\g$\files.

The web app runs on Tomcat which is being run as a Windows service i.e. no user is logged in.

I can access the directory when logged in as a user; and the web application can also access it when I start tomcat from a script; but if I start tomcat as a Windows service then it can't access the directory.

Can anyone suggest why the service can't access the remote path?

share|improve this question
1  
Most likely your problem is the service is running as a system user, and not a network user or a user on the remote machine. In a domain you would want to either allow everyone / anon users too, or preferable create a service account on the domain / network and run the service as that account – AthomSfere Sep 19 '13 at 15:28
    
@AthomSfere Thanks... you've hit the nail on the head. I've reworded my question so you can provide this as an answer. Please do so I can accept it – Edd Sep 19 '13 at 16:12
up vote 2 down vote accepted

As an answer to the re-worded question:

Most likely your problem is the service is running as a system user, and not a network user or a user on the remote machine. In a domain you would want to either allow everyone / anon users too, or preferable create a service account on the domain / network and run the service as that account

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .