Solved

Copy files as backup operator

Posted on 2008-06-19
5
263 Views
Last Modified: 2013-12-04
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
Comment
Question by:Frosty555
  • 3
  • 2
5 Comments
 
LVL 27

Expert Comment

by:planocz
ID: 21826322
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
 
LVL 31

Author Comment

by:Frosty555
ID: 21831416
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
 
LVL 27

Accepted Solution

by:
planocz earned 500 total points
ID: 21831785
your right the program just runs the person that is login has to have administrator's group permission.
0
 
LVL 31

Author Comment

by:Frosty555
ID: 21837760
you can have a .net program execute using a different user's credentials somehow?
0
 
LVL 27

Expert Comment

by:planocz
ID: 21845838
I do not know few that can be done.
0

Featured Post

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SHARE your personal details only on a NEED to basis. Take CHARGE and SECURE your IDENTITY. How do I then PROTECT myself and stay in charge of my own Personal details (and) - MY own WAY...
No security measures warrant 100% as a "silver bullet". The truth is we also cannot assume anything but a defensive and vigilance posture. Adopt no trust by default and reveal in assumption. Only assume anonymity or invisibility in the reverse. Safe…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question