![]() |
|
|
Published: Wednesday, February 23, 2000 By Brian Atkinson It is often said that it makes good sense to store your databases outside of the web accessible directories. But in many hosting situations this is not always possible. What if there is a way to have a non-web-accessible directory located inside the web-accessible directory?
Setting up a non-web accessible database from within a web-accessible
directory is actually quite simple. Suppose that we have a Default Web
Site and several folders underneath it. One of the folders is named
If you were to visit the specific URL, like: Also, as discussed in Security Alert - Using includes Improperly from non-Debugged ASP Pages can allow Visitors to View your source code, placing include files without a .ASP extension in directories with read permissions constitutes a security risk. Now that we've identified why placing sensitive files in public Web site directories is a problem, we will investigate how to prevent this access!
Start by opening the Internet Service Manager and navigating to the
Removing the READ Access Permission is the key to preventing web access to this folder. Removing the READ permission tells IIS that HTTP READ requests will not be allowed to this folder. Since nothing should be located inside this folder except a database, it is also safe to change the Permissions settings to NONE also. Keep in mind that these settings have nothing to do with NTFS permissions, which we will look at a bit later.
Save the console settings and exit the MMC. Now let's test these settings.
If you try revisiting your Access database through a URL, like we did earlier,
You will receive the
The next question is how can an Active Server Page access the database if
there is no READ access? All file access (including ASP activity) must be
performed through the context of an NT user. For convenience sake, let's
assume that it is the In Windows Explorer, navigate to the following folder:
Obtain the Security Properties for this folder and notice the NTFS
permissions. Without going into excessive detail, here is where you will
want to ensure that
That is all that is required to secure a database folder from URL-guessing
eyes. This method can also be used to protect text files that are accessed
by the Good Luck and Happy Programming.......
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||