Home All Groups Group Topic Archive Search About

Task scheduling : error 0x80070005: Access denied

Author
21 Mar 2005 3:31 PM
François Miermont
Hi,


I encountered a problem with the Task scheduler with Windows 2003 standart
edition.

I'll want to make a scheduled task that launch a .bat file. The .bat file
works great (tested in command prompt).
I assign my save user to do this task. When I have an interactive session
opened with my save user, and then I launch the task manually, it work. But
if I close my session, the task does not launch, and I found this error ine
the log :
      "backup.job" (backup.bat) **ERROR**
       0x80070005: Access is denied.
      Try using the Task page Browse button to locate application.

My save user have full ntfs permission on both .bat and .job directory.

Please need help :)

PS/ sorry for my poor English :p

Author
21 Mar 2005 4:18 PM
Dave Patrick
Your English is just fine. Remember that if it involves network resources,
make sure the user account has permissions to the resources and also use UNC
paths as mapped drives won't exist when no one is logged on. Scheduled
Tasks|Advanced|View Log may provide some details.


--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

Show quoteHide quote
"François Miermont" wrote:
| Hi,
|
|
| I encountered a problem with the Task scheduler with Windows 2003 standart
| edition.
|
| I'll want to make a scheduled task that launch a .bat file. The .bat file
| works great (tested in command prompt).
| I assign my save user to do this task. When I have an interactive session
| opened with my save user, and then I launch the task manually, it work.
But
| if I close my session, the task does not launch, and I found this error
ine
| the log :
|      "backup.job" (backup.bat) **ERROR**
|       0x80070005: Access is denied.
|      Try using the Task page Browse button to locate application.
|
| My save user have full ntfs permission on both .bat and .job directory.
|
| Please need help :)
|
| PS/ sorry for my poor English :p
Are all your drivers up to date? click for free checkup

Author
21 Mar 2005 4:27 PM
François Miermont
Thx for your interest !

The error log that I gave before was in the Scheduled Task/Advanced/View Log
file.

I also tested the task using the administrator user, with the interactive
session closed. It just work fine !

Seems to be a permission problem, but I cant found where :-(

Show quoteHide quote
"Dave Patrick" wrote:

> Your English is just fine. Remember that if it involves network resources,
> make sure the user account has permissions to the resources and also use UNC
> paths as mapped drives won't exist when no one is logged on. Scheduled
> Tasks|Advanced|View Log may provide some details.
>
>
> --
> Regards,
>
> Dave Patrick ....Please no email replies - reply in newsgroup.
> Microsoft Certified Professional
> Microsoft MVP [Windows]
> http://www.microsoft.com/protect
>
> "François Miermont" wrote:
> | Hi,
> |
> |
> | I encountered a problem with the Task scheduler with Windows 2003 standart
> | edition.
> |
> | I'll want to make a scheduled task that launch a .bat file. The .bat file
> | works great (tested in command prompt).
> | I assign my save user to do this task. When I have an interactive session
> | opened with my save user, and then I launch the task manually, it work.
> But
> | if I close my session, the task does not launch, and I found this error
> ine
> | the log :
> |      "backup.job" (backup.bat) **ERROR**
> |       0x80070005: Access is denied.
> |      Try using the Task page Browse button to locate application.
> |
> | My save user have full ntfs permission on both .bat and .job directory.
> |
> | Please need help :)
> |
> | PS/ sorry for my poor English :p
>
>
>
Author
21 Mar 2005 4:41 PM
Dave Patrick
We're clueless without seeing the contents of backup.bat

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

Show quoteHide quote
"François Miermont" wrote:
| Thx for your interest !
|
| The error log that I gave before was in the Scheduled Task/Advanced/View
Log
| file.
|
| I also tested the task using the administrator user, with the interactive
| session closed. It just work fine !
|
| Seems to be a permission problem, but I cant found where :-(
Author
21 Mar 2005 4:51 PM
François Miermont
Okay, here it is :

robocopy E:\Projets \\Cypher\BackupServiceDev\ /MIR /R:0 > .\Backuplog.txt
MyMail thomas .\Backuplog.txt

Show quoteHide quote
"Dave Patrick" wrote:

> We're clueless without seeing the contents of backup.bat
>
> --
> Regards,
>
> Dave Patrick ....Please no email replies - reply in newsgroup.
> Microsoft Certified Professional
> Microsoft MVP [Windows]
> http://www.microsoft.com/protect
>
> "François Miermont" wrote:
> | Thx for your interest !
> |
> | The error log that I gave before was in the Scheduled Task/Advanced/View
> Log
> | file.
> |
> | I also tested the task using the administrator user, with the interactive
> | session closed. It just work fine !
> |
> | Seems to be a permission problem, but I cant found where :-(
>
>
>
Author
21 Mar 2005 5:12 PM
Dave Patrick
Does your user have permissions to write to \\Cypher\BackupServiceDev\ ? Is
E:\ a local drive? If not try using a UNC path for it. If so you might try
something simple to help determine the problem such as xcopy one file from
source to destination.

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

Show quoteHide quote
"François Miermont" wrote:
| Okay, here it is :
|
| robocopy E:\Projets \\Cypher\BackupServiceDev\ /MIR /R:0 > .\Backuplog.txt
| MyMail thomas .\Backuplog.txt
Author
22 Mar 2005 9:01 AM
François Miermont
Yes, my user have permission to write to Cypher, and E: is a logical drive.

I also try to a simple copy, but the problem is that the task did not
execute at all. The problem appears before that the .bat is launched.

Show quoteHide quote
"Dave Patrick" wrote:

> Does your user have permissions to write to \\Cypher\BackupServiceDev\ ? Is
> E:\ a local drive? If not try using a UNC path for it. If so you might try
> something simple to help determine the problem such as xcopy one file from
> source to destination.
>
> --
> Regards,
>
> Dave Patrick ....Please no email replies - reply in newsgroup.
> Microsoft Certified Professional
> Microsoft MVP [Windows]
> http://www.microsoft.com/protect
>
> "François Miermont" wrote:
> | Okay, here it is :
> |
> | robocopy E:\Projets \\Cypher\BackupServiceDev\ /MIR /R:0 > .\Backuplog.txt
> | MyMail thomas .\Backuplog.txt
>
>
>
Author
22 Mar 2005 9:29 AM
François Miermont
And also, if I open an interactive session with my save user, and then go to
Scheduled task|File|Execute, the .bat works !

The problem is, I think, a problem of permission to launch a .bat as a task
(or service ?).

I also look at the GPO, but my save user have rights "Open a session as a
service" and "Open a session as a Task".

Show quoteHide quote
"Dave Patrick" wrote:

> Does your user have permissions to write to \\Cypher\BackupServiceDev\ ? Is
> E:\ a local drive? If not try using a UNC path for it. If so you might try
> something simple to help determine the problem such as xcopy one file from
> source to destination.
>
> --
> Regards,
>
> Dave Patrick ....Please no email replies - reply in newsgroup.
> Microsoft Certified Professional
> Microsoft MVP [Windows]
> http://www.microsoft.com/protect
>
> "François Miermont" wrote:
> | Okay, here it is :
> |
> | robocopy E:\Projets \\Cypher\BackupServiceDev\ /MIR /R:0 > .\Backuplog.txt
> | MyMail thomas .\Backuplog.txt
>
>
>
Author
22 Mar 2005 10:27 AM
Dave Patrick
Check that the user also has logon as batch job rights on \\Cypher

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

Show quoteHide quote
"François Miermont" wrote:
| And also, if I open an interactive session with my save user, and then go
to
| Scheduled task|File|Execute, the .bat works !
|
| The problem is, I think, a problem of permission to launch a .bat as a
task
| (or service ?).
|
| I also look at the GPO, but my save user have rights "Open a session as a
| service" and "Open a session as a Task".
Author
22 Mar 2005 10:43 AM
François Miermont
On Cypher ? It's the remote server.

Well, I also check, and I think it's ok (not sure, because in French the
rule is call "Ouvrir une session en tant que tâche", is it that ?).

Thx a lot for your interest :-)

Show quoteHide quote
"Dave Patrick" wrote:

> Check that the user also has logon as batch job rights on \\Cypher
>
> --
> Regards,
>
> Dave Patrick ....Please no email replies - reply in newsgroup.
> Microsoft Certified Professional
> Microsoft MVP [Windows]
> http://www.microsoft.com/protect
>
> "François Miermont" wrote:
> | And also, if I open an interactive session with my save user, and then go
> to
> | Scheduled task|File|Execute, the .bat works !
> |
> | The problem is, I think, a problem of permission to launch a .bat as a
> task
> | (or service ?).
> |
> | I also look at the GPO, but my save user have rights "Open a session as a
> | service" and "Open a session as a Task".
>
>
>
Author
22 Mar 2005 11:27 AM
François Miermont
Ok now I'm sure it's a security problem : if I make my save user member of
the local administrators group, the task run ! But I don't want to let him in
this group.

I'm unable to find the correct configuration.

Show quoteHide quote
"François Miermont" wrote:

> On Cypher ? It's the remote server.
>
> Well, I also check, and I think it's ok (not sure, because in French the
> rule is call "Ouvrir une session en tant que tâche", is it that ?).
>
> Thx a lot for your interest :-)
>
> "Dave Patrick" wrote:
>
> > Check that the user also has logon as batch job rights on \\Cypher
> >
> > --
> > Regards,
> >
> > Dave Patrick ....Please no email replies - reply in newsgroup.
> > Microsoft Certified Professional
> > Microsoft MVP [Windows]
> > http://www.microsoft.com/protect
> >
> > "François Miermont" wrote:
> > | And also, if I open an interactive session with my save user, and then go
> > to
> > | Scheduled task|File|Execute, the .bat works !
> > |
> > | The problem is, I think, a problem of permission to launch a .bat as a
> > task
> > | (or service ?).
> > |
> > | I also look at the GPO, but my save user have rights "Open a session as a
> > | service" and "Open a session as a Task".
> >
> >
> >
Author
23 Mar 2005 3:45 AM
Dave Patrick
Yes on remote server.

Control Panel|Admin Tools|Local Security Policy\Local Policies\User Rights
Assignments
"Log on as a batch job"

I can't read French but a translator I used gets "To open a session as a
task" I'm not sure it's the same of not really.

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

Show quoteHide quote
"François Miermont" wrote:
| On Cypher ? It's the remote server.
|
| Well, I also check, and I think it's ok (not sure, because in French the
| rule is call "Ouvrir une session en tant que tâche", is it that ?).
|
| Thx a lot for your interest :-)
Author
23 Mar 2005 8:53 AM
François Miermont
That's the correct translation.

I have found where's the problem. I can make a task that launch calc.exe for
exemple. I also can copy calc.exe in my .bat's directory, and then make a
task that launch it.
But I'm unable to make a task that launch a .bat (or .cmd). I really think
there's something like IIS lockdown, no ?

Show quoteHide quote
"Dave Patrick" wrote:

> Yes on remote server.
>
> Control Panel|Admin Tools|Local Security Policy\Local Policies\User Rights
> Assignments
> "Log on as a batch job"
>
> I can't read French but a translator I used gets "To open a session as a
> task" I'm not sure it's the same of not really.
>
> --
> Regards,
>
> Dave Patrick ....Please no email replies - reply in newsgroup.
> Microsoft Certified Professional
> Microsoft MVP [Windows]
> http://www.microsoft.com/protect
>
> "François Miermont" wrote:
> | On Cypher ? It's the remote server.
> |
> | Well, I also check, and I think it's ok (not sure, because in French the
> | rule is call "Ouvrir une session en tant que tâche", is it that ?).
> |
> | Thx a lot for your interest :-)
>
>
>
Author
23 Mar 2005 9:03 AM
François Miermont
I was right !

Here is the solution : http://support.microsoft.com/kb/867466/en-us

It's a really new feature of Windows 2003.

Thx a lot for your help Patrick ;-)

Show quoteHide quote
"François Miermont" wrote:

> That's the correct translation.
>
> I have found where's the problem. I can make a task that launch calc.exe for
> exemple. I also can copy calc.exe in my .bat's directory, and then make a
> task that launch it.
> But I'm unable to make a task that launch a .bat (or .cmd). I really think
> there's something like IIS lockdown, no ?
>
> "Dave Patrick" wrote:
>
> > Yes on remote server.
> >
> > Control Panel|Admin Tools|Local Security Policy\Local Policies\User Rights
> > Assignments
> > "Log on as a batch job"
> >
> > I can't read French but a translator I used gets "To open a session as a
> > task" I'm not sure it's the same of not really.
> >
> > --
> > Regards,
> >
> > Dave Patrick ....Please no email replies - reply in newsgroup.
> > Microsoft Certified Professional
> > Microsoft MVP [Windows]
> > http://www.microsoft.com/protect
> >
> > "François Miermont" wrote:
> > | On Cypher ? It's the remote server.
> > |
> > | Well, I also check, and I think it's ok (not sure, because in French the
> > | rule is call "Ouvrir une session en tant que tâche", is it that ?).
> > |
> > | Thx a lot for your interest :-)
> >
> >
> >
Author
23 Mar 2005 10:29 AM
Dave Patrick
Good find! Glad to hear it is resolved.

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

Show quoteHide quote
"François Miermont" wrote:
|I was right !
|
| Here is the solution : http://support.microsoft.com/kb/867466/en-us
|
| It's a really new feature of Windows 2003.
|
| Thx a lot for your help Patrick ;-)

Bookmark and Share