Link to home
Start Free TrialLog in
Avatar of hypercube
hypercubeFlag for United States of America

asked on

File permissions, Users/Groups, .bat files and Task Scheduler / Windows 10 Pro

We are using Second Copy (SC) to back up files.  This has been very successful for years.  I'm in the process of tightening up on file access security.
We use Windows Task Scheduler to fire off backup profiles in Second Copy - (even though SC has internal scheduling capability).
Here is the sequence of events:
Task Scheduler launches a .bat file which, among other things, logs the event and launches an SC backup profile.
The SC backup profile starts by launching a .bat file for logging.
The SC backup runs and writes files to a backup store which is tightly controlled.
The SC backup profile ends by launching a .bat file for logging.
END

Open in new window


Let's assume that the workstation is idle and there is no User logged in.
The Task Scheduler task is, as always, configured to be run by a specified User - whether that User is logged in or not.
The User has batch local security right enabled via secpol.
The User also has write privileges to the backup store.
I think that's about it...  
And, this appears to be working now but I'd like to have a better idea of "why does it work?".

As I see things:
- The Task Scheduler, on schedule, runs a .bat file as "the User".
- The batch file starts Second Copy ..... as "the User" ?????
- Second Copy runs as "the User" ????
- The backup works to access the backup store as "the User" ????

Does the User-context flow through the entire process?

What if the scheduled task is by one User and we might want one of the tasks in the chain to be by another User?
By "by another User" I mean: with the privileges of another user.
So, I suppose one might use "runas".
Does this rather answer the first question?
ASKER CERTIFIED SOLUTION
Avatar of McKnife
McKnife
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hypercube

ASKER

Thank you McKnife!!