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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Protecting an Access Database

Status
Not open for further replies.

knappm

Programmer
Apr 4, 2001
13
US
Heya.

I will soon be developing a website using VBScript in ASP. It will run on a W2K server with an Access 2000 database. The ASP will require a logon/pass, store that information, and then check it against a verification script included within each ASP page. That should ensure that the ASP pages only retrieve the database content for authorized viewers. Only the ASP pages and data within the database need be protected, other files (such as images, other html files, etc.) don't need to be secured.

My question is this: What is the best way to secure the database from unauthorized viewing? The first thing that comes to mind is to prevent the download of the database. It seems to me it would work well to place it outside of the directory structure of the website. For example, if the root of the website was "d:\inet\ then I may place the database here "d:\inet\db\website\db1.mdb". Is this a good solution to stop the downloading of the database? What other solutions are possible? What else should be considered when trying to protect the database?

Thanks much for the help!
Mark
 
You could modify the connection string and add a password to the database so if they download it they cant open it without the password. Also you might try to put it in a wierd names directory like d:\inet\db\website\1551564654324
3\db1.mdb - I doubt they'll find it there
 
Right. Those are both good ideas that I have considered. However, I believe it is possible to crack the password on an Access database. And while it's true that they most likely won't find a database hidden in a few levels of obscure directories, it's still possible. I imagine implementing both of these measures together would probably suffice if it were the only options.

However, what else is possible? What do you think of putting the db outside of the website's directory structure as I mentioned above? Doesn't that completely prevent a user from manually accessing the db? Does it create any other concerns? (Quite a barrage of questions.. hehe).

I really appreciate the help! Thanks again.
Mark
 
Putting it outside of the direct http access is a good first step. Password protecting it isn't really necessary, since you would need to provide you password someplace in you r connection string anyway. Anyone who would be able to access the DB outside of the "normal" virtual server directory structure - wouldn't be stopped by the type of security Access implements.

You should however, by taking away COMPLETE rights for the "D" drive for the IUSR_MACHINE name account and the "Everybody" account. (Be careful - I am assuming that there are isn't any software installed on "D" - such as MSADO or other things necessary to run your website. Then reassign the IUSR_MACHINE name rx rights (Read/Execute) on your website (d:\inet\ I am assuming you are only running one virtual server.

Then on your database path (for ex. d:\inet\database) grant the user read access on the database AND read/write/delete on the directory - otherwise access locking won't work - Access will access it's ldb file in the context of the user - in our case the IUSR_MACHINE name and if it can't be written to or deleted things tend to blow up; )

If the IUSR_ needs to write to the database, then just assign him write priviledges for the mdb as well.

Be aware however - be ready to lose the database - if it is running on Microsoft software ;)
 
Try looking into Access's ENCRYPTION feature within the program....I know this exists, but I've not used it. I believe it works for the purpose of scrambling your data should the core database be illegally accessed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top