WatchDirectory home page
WatchDirectory Startseite (Deutsche Version)
Site WatchDirectory (Français)
  Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
   
  HomeHelpSearchLoginRegister  
 
Page Index Toggle Pages: 1
run as a service but not as local (Read 3538 times)
pbrooks
YaBB Newbies
*
Offline



Posts: 3
run as a service but not as local
Nov 14th, 2005 at 6:19pm
 
has anyone had trouble running as a service but not as the local.
I need to run a bat file the kicks off some oracle reports, the local service account does not have the right to run the reports, but when I put in a user that does, the service starts and stops within seconds with no error reported
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: run as a service but not as local
Reply #1 - Nov 14th, 2005 at 6:44pm
 
Hi,

Just recently another customer notified us about the cause of this. There is no automatic fix yet, but you should be able to "do it yourself".
The problem is caused by the fact that when you create a new task with userid "John", all configuration files (your task definition, history database and .bat files) are owned by John.
When you run as a service, using the LocalSystem (default) userid, there is no problem (LocalSystem has access to all files on the local computer).
Now you change the service settings to "login" using the userid "Thelma" (being creative with names here) and Windows doesn't allow Thelma to access files created by "John".

To solve this issue:
  • start the watchDirectory Control Center
  • press CTRL+9 (this opens explorer inside C:\Documents and Settings\All Users\Application Data\watchDirectory)
  • right-click the YourTaskName.config file
  • select the properties menu entry, followed by the security tab
  • make sure the user "Everyone" (or "Thelma") has "Full Control".

repeat the above for the file "common.ini", also found in that directory and for the directory and all file inside the directory that has the same name as your task.
So, if your task is called oraclereports, you need to set/check the permissions for the following files:
  • C:\Documents and Settings\All Users\Application Data\watchDirectory\oraclereports.config
  • C:\Documents and Settings\All Users\Application Data\watchDirectory\common.ini
  • C:\Documents and Settings\All Users\Application Data\watchDirectory\oraclereports (this is a directory)
  • C:\Documents and Settings\All Users\Application Data\watchDirectory\oraclereports\*.* (all files inside it, probably just history.db and wd.bat)

If your task uses a batch script (and I guess yours does), you should also do this for that script (it is called from inside the wd.bat file).

Gert
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
pbrooks
YaBB Newbies
*
Offline



Posts: 3
Re: run as a service but not as local
Reply #2 - Nov 16th, 2005 at 6:14pm
 
I made all the changes in the soultion, but the task still starts and ends within a couple seconds.
there are no errors in any of the logs, and it does not give a error when it ends, it just stops.
the user I am running the task as is a administrator on that machine, and has full control to all the files and directories in the fix, as well as the files and directories in the bat file.  any ideas?
Back to top
 
 
IP Logged
 
pbrooks
YaBB Newbies
*
Offline



Posts: 3
Re: run as a service but not as local
Reply #3 - Nov 16th, 2005 at 6:38pm
 
I changed the monitor method, and everything started working.
thanks
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: run as a service but not as local
Reply #4 - Nov 16th, 2005 at 7:39pm
 
If you were originally using the "Fast" monitoring method, you could try enabling "Fast" again, and make sure the user is a member of the "backup operators" group. That privilege is needed for the fast monitoring mehod.

Gert
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Page Index Toggle Pages: 1