Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 275
  • Last Modified:

Copy files as backup operator

In VB.Net I'm enumerating folders and files using DirectoryInfo.GetFiles(), and eventually I want to open and copy the contents of those files into a backup archive. When the program tries to access folders or files it does not have access to I get an Unauthorized Access Exception.

How can the program identify itself as a backup operator instead, so that I can access the files?
0
Frosty555
Asked:
Frosty555
  • 3
  • 2
1 Solution
 
planoczCommented:
You will have to have your network admin guy set you up with a special login name, and password for each of the directories you want to get to.
0
 
Frosty555Author Commented:
I am the network admin guy. Technically this is a product that will be installed on end user's machines.

Okay, so lets say I have a special user who is part of the backup operator's group (or administrator's group if that's necessary). How do I have Vb.net use that user's credentials to perform the copy? Or how does VB.NET identify that it is performing a "backup" or "restore" operation as opposed to just opening the file and reading it?
0
 
planoczCommented:
your right the program just runs the person that is login has to have administrator's group permission.
0
 
Frosty555Author Commented:
you can have a .net program execute using a different user's credentials somehow?
0
 
planoczCommented:
I do not know few that can be done.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now