So I have a batch script for robocopy. Running this from the command line does exactly what I want.
robocopy "D:SQL Backup" \server1Backup$daily /mir /s /copyall /log:\lmcrfs4gNavBackup$robocopyLog.txt /np
Then I create a Scheduled Task in Windows Server 2008. If I set up the task to use my Domain Admin account, great. But I’m trying to get it to run as a separate domain account for Scheduled Tasks. If I use that account, folders get created, but files aren’t copied. I get the following error:
2011/02/17 15:41:48 ERROR 1307 (0x0000051B) Copying NTFS Security to Destination Directory D:SQL Backupfolder
This security ID may not be assigned as the owner of this object.
I’ve verified my domainScheduled Tasks account has Full Control NTFS permissions on both the source and destination, and the Full Control Sharing on my hidden server1backup$ share. Just for giggles, I’ve tried adding the domain account to the local Administrators group on both servers. This works fine, but that seems like a lot of privileges just to copy files. Any ideas on what I’m missing?
EDIT TO ADD:
I’ve tried using the robocopy copy:DATSO flag rather than copyall (I can skip the auditing info), but I still get the same error.
I’ve also tried using runas noprofile user:my Scheduled Tasks user for the robocopy command. I get the same error again.
I’m not averse to simply adding the user to a Built-In group, though Administrators seems like it would be overkill. I’d be interested to know how others handle their Scheduled Tasks.
The account used to perform the copy must have the “Restore files and directories” user right to change the owner to anything other than itself or Administrators.
- windows 2003 server scheduled task resources
- Do not start scheduled task on windows until the previous one is finished
- Windows Server Scheduled Tasks running command windows, how to prevent them from popping up?
- How do you designate where a Scheduled Task is created?
- Why no job history despite manually triggering my scheduled job (on Windows 2008)?
Leave a comment
- Is there a way for administrators to disable users from installing Firefox extensions?
- Is there research material on NTP accuracy available?
- How to create a limited “domain admin” that does not have access to domain controllers?
- Can Windows RDC admin users be immune from being kicked?
- Domain Administrators account policy (After PCI audit)