"Access is denied" when trying to run new Scheduled Task 0x80070005

1

We are using the wonderful NTBackupScript on a Windows 2003 server to automate our backups with the built-in NTBackup. I've used this successfully in the past to run totally automated and bombproof backups, but we're rebuilding our backup server and have run into some snags when trying to create and run the scheduled tasks.

At this point we believe it's a permissions issue that is preventing the scheduled tasks from running. However, we think we've looked into all permissions and security-related issues and can't figure out why it's still not running.

We have already:

  1. UNBLOCK'ed all files from the .zip file.
  2. Tried every iteration of " and ' with the parameters (e.g. checktape, differential, FullBackup.bks, etc.) <-- Apparently we did not try every iteration. See answer, below.
  3. Password is correct.
  4. Running all of this as Administrator.
  5. Added "Batch" permissions to cmd.exe per one of the MS Technet recommendations.
  6. Ensured that Administrator has the right permissions to cmd.exe per Technet.
  7. Checked that Administrative Tools/Services/Task Scheduler uses "Local System" as its Log On As account.
  8. It doesn't make sense to create a special user/group for this as outlined here.
  9. Used Process Monitor to look for potential issues but nothing jumped out at us (and we are Process Monitor noobs).

We still get the error 0x80070005 in the log. Why?

The schedule tasks in the list

Scheduled Task log w/ error message

Parameter options - we've tried with and without single and double quotes

Process Monitor output includes the following. NAME NOT FOUND and BUFFER OVERFLOW are suspicious but I haven't figured out what to do differently based upon them.

Detailed output from Process Monitor

windows-server-2003
windows-task-scheduler
ntbackup
asked on Super User Dec 14, 2011 by Mark A • edited May 26, 2018 by fixer1234

2 Answers

1

So it turns out that the command line parameters / options are very important to have formatted properly with the quotes in the right places. We thought we had tried every option here, but apparently we did not try the right option until just now. This post has the money text:

Important: The command line options must be placed OUTSIDE of the "" that surround the path. "" are needed because otherwise path names with spaces (like in c:\program files) can not be interpreted correctly by the task scheduler.

The correct entries in "Run:" are:

"C:\Program Files\NTBackupScript\ntbackupscript.cmd" checktape
"C:\Program Files\NTBackupScript\ntbackupscript.cmd" BackupJobFull normal
"C:\Program Files\NTBackupScript\ntbackupscript.cmd" BackupJobFull differential
answered on Super User Dec 14, 2011 by Mark A • edited Dec 14, 2011 by Mark A
0

I didn't see it mentioned: Have you looked in the windows event viewer? (It could be logging something in any of the 3 major logs: System, Application or Security)

answered on Super User Dec 14, 2011 by Dan Esparza

User contributions licensed under CC BY-SA 3.0