Permissions

A very common and extremely bothersome error encountered when running database operations is the "80004005" error. It comes in many varieties. The error occurs if the Everyone or IUSR account does not have Read, Write, Delete permission ( Change permission on NT4; Modify permissions on Windows 2000) on the folder on the server where the database resides. This permission is needed because site visitors via the web browser must be able to access the database via the ASP code.

Generally, the required permissions on this folder are set by the server administrator. Correct permissions settings are critical to the operation of the ASP code.


Please realize when testing this on your own machine and running PWS on Windows 95/98, you will not need to set any permissions on the database. You only need to worry about this when running on a NT or 2000 web server.

Below are some examples of the many forms the
"80004005" error can take.

[Microsoft][ODBC Microsoft Driver] Not a valid password.

Microsoft JET Database Engine (0x80040E4D)

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x6a4 Thread 0x744 DBC 0x25fafe4 Jet'.

These errors are basically because the database could not be found or accessed. If you see any variety of these errors it is because the permissions have not been correctly set or you have not specified the data path correctly. It is also possible something is wrong on the server. 95% of the time it is not because of a server problem.

These permissions can only be set by a server admin who has direct access to the web server. If you are not the server admin you will need to ask for them to set these permissions for you. You may also need to ask them what the physical path info is though the following URL may help you figure that out.
http://www.powerasp.com/content/hintstips/physical-path.asp


Below is a quick summary of how permissions work and what they need to do to set them in case you are curious.

ASP pages are accessed by anonymous users via the web browser
When users access these pages via a web browser IIS will use (by default) a Windows NT account called USR_<machinename> or "everyone".

To set the permissions you have to be on the server and browse to the folder the database is in. Then right click and choose properties. Then you give that account change or modify permissions on that folder that the database is in. Change or modify means... r w x d (read/write/execute/delete).

If using the SAFILUP component the directory you store pictures in needs special permissions as well.
Consult their documentation for more info on that. 


Disclaimer... www.CJWSoft.com makes no guarantee about the security this script offers. Use this at your own risk. To the best of knowledge it is very secure, but that doesn't mean there isn't a bug or some hacker will never find a way into it. We recommend you rigorously test it and change the password on the Access database before you start using this. That way if someone downloads your database they will a hard time getting anything useful out of it especially since the database supplied with this download is also encrypted. There are utilities available to crack Access database's so if you really want secure password protection you should port this to a SQL database.  If using Access and your web is frontpage enabled you can right click on a folder in frontpage explorer and choose properties, this will allow you to uncheck "allow files to be browsed" which will stop people from downloading your Access database if they somehow figure out the URL.