Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Control File Access

Status
Not open for further replies.

bmoyer23

MIS
Dec 5, 2001
46
US
I have a .pdf file that is launched via my VB application. I want the user to have read access to this file via the application ONLY... no acces to the file outside the application. Any ideas?

I was thinking of having the network admin set up a new network userid with the proper permissions. Then, all users would run the application as this new userid. Is something like this do-able. Thanks in advance.
 
Can you not store the file as .pda and then run some kind of convertor routen? - As in the program renames .pdf and opens then resets?
Other wise put in a seperate folder and have it hidden and permission locked!
 
Thanks for the response Dan688.

I might consider the renaming option.

Also locking the folder will not work, because the user will not have access when running the application.
 
I presume you're trying to protect this file for a reason - ie it's sensitive. That being the case, I would really not be happy with merely changing the extension - WAY to easy for someone to guess what it is and change it back...

Instead, I would look at something like storing the file on the network in an encrypted state, and then decrypting it for use...

I think I have some code at home that I wrote for encrypting strings - and if I can find it I'm prepared to give you the source code - it's not too complex.

Mail me at martin at mjmilan dot com if you're interested.

mmilan.

ps. No nasty comments about the website - it's under development!
 
I agree with mmilan about it being to easy to access the file by guessing what to open it with from outside of your program. However, one thing to keep in mind is that if you encrypt the file through your program and store it in it's encrypted state on the network then the only way to properly and easily access it is through your program. So if someone with proper access needs/wants to just browse to and open it through the network they will not be able to do this. But again if that is all ok then this is probably a good, quick way to do it. You can set permissions through Windows though at the file level and give proper access then. They can still use your program but will not be able to open any file that user does not have proper access rights to.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top