I have a Windows computer that nightly receives a backup via rsync (rsync for windows). Those files are all then backed up to crashplan (cloud based backup). The problem is that permissions get screwed up during the rsync process so I have to fix them all. I have a batch file set up to take care of it and I have that run as a scheduled task. The scheduled task runs but the permissions are not fixed but when I manually invoke the batch file it works exactly as needed. Here's my batch file...
icacls "d:\bak_r" /remove:d jpfulton /T > c:\acl_fix_log.txt
icacls d:\bak_r\*.* /reset /t /c /q > c:\acl_fix_log2.txt
Also, my scheduled task is set to run with a user account with administrator priveleges with "run whether user is logged on or not" checked and "run with highest priveleges" checked. The trigger is "daily at 1am" (which is about 3 hours after rsync completes every night).
Why isn't it working? Any help is much appreciated.