oly said:
I run tomcat as windows service ,and my web service need store files in
network.
I do in this way:
1.Start tomcat service use user A in administrators group
2.log in windows use user A and build net path use command "net use z:
\\storeserver\path"
But web service cannot access Z:
why and how to solve it ?
If you aren't running a domain, the local accounts on the client mean
nothing to the server. You could create an account with the same name and
password on both the the client and server. You will need to keep the
passwords in sync manually. Don't use a blank password, as there is a
default policy that will block network access for that account completely.
Grant NTFS and share permissions to the local user to the path on the
server.
You can also consider the built-in NETWORK SERVICE account. See:
http://www.microsoft.com/technet/security/guidance/serversecurity/serviceaccount/default.mspx
although it may not allow for the necessary local access on the client (PC
running Tomcat.)
Your problem might also be that the Z: drive doesn't exist in the user's
session when the service starts up. Can you create a login script for that
account? Or maybe just use UNC notation (if Tomcat allows that)
\\storeserver\path and forget about drive mappings.