Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windows XP Service and shared folder access

Status
Not open for further replies.

Madere

Technical User
Apr 14, 2003
85
GB
Hi all,

i have Java programm that copies, archives files from 1 directory to another. This can all be configured in a properties file. When i start this programm from the command line or from the Windows Service window, all works fine when i use only locally drives and directories.

When i use directories on a shared folder (the shared folder is locally or on a remote PC) then my programm still works fine when started from the commandline. But when i start my programm as a service, the programm cant read/write on the shared folders.

Even when i start the service with my own local account, it still fails.

I am using Java 1.4 on a Windows XP PC. I have used the JavaService.exe from internet to install my Java programm as Windows service.

Does someone has an idea what is causing the problem and what the solution might be?

Thanks in advange.

Regards,

Madere.
 
when running a service, this can be done as a certain user.Are you sure you have sufficient rights to access the share with the user as which the service is running?
-> service -> properties-> log on

rgrds,

R.
 
RMGBELGIUM,

as i wrote: "Even when i start the service with my own local account, it still fails".
When starting from the CommandLine all is OK.

So is it possible that the local user has different permissions from a CommandLine as from the Services?

Regards,

Madere.
 
try the following :
run the service with a user with admin privileges , and that same user must have permissions to access the remote share.See what that gives you.

rgds,

R.
 
RMGBELGIUM,

my local account HAS admin priviledges.
It would be nice if u read my question very well. And only answer if u have a good point. These answers don help me much.

Madere
 
as far as I can see, you didn't mention your local account was member of the administrators.So have fun with your problem.And there IS a difference between being administrator and being a member of the administrator group.

R.
 
So my local account is, on Windows XP, a Computer Administrator.

When starting from the command line i have full access to the shared folders. When starting the service under the local account i dont have. I do not see anything that is different.

If my local account did not have the right permissions, why can it access the folders when starting from a CommandLine?

Madere.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top