tags:

views:

69

answers:

2

Is it possible to restrict access to a MS Access db on a users computer to a web server?

The web application will be using this database and the user who is hosting it wants it locked down to everyone except the web server using it.

Is this possible?

A: 

Access uses file permissions first - so you can use NTFS and if the web application is running under a particular account, only that account can be given access to the directory (remember, it need to create those .ldb files).

You can also use Access security to make an account in the database.

Cade Roux
+1  A: 

So where exactly is the Access database (mdb file) located? You say it's on the users computer, but then make it sound like it is being used by your web server.

Is the users computer also being used as a web server? (this is probably bad)

Is the database on a shared folder on the users computer, being access by the webserver (this is definitely bad due to less then perfect file locking, unless the web server is doing read only operations)

If the web server is a seperate machine and your environment is Active Directory, or if the server and users machine are the same, you can just set permissions of the database mdb file to only allow the user and the account the web server runs under to access it.

Alternatively, if the file is on a share, you could set the permissions of the share folder to only allow those 2 accounts.

David
You said: "Is the database on a shared folder on the users computer, being access by the webserver (this is definitely bad due to less then perfect file locking, unless the web server is doing read only operations)"Yes..this is the setup. Issues with file locking because it's Access ? Only 2 or 3 people will be using this.
chopps
Access relies on each client to cooperate in order to prevent database corruption (two clients writing conflicting data). This cooperation is achieved through file locking and an .ldb file. However your basic network share is not bullet proof when it comes to file locking - it is possible (with very exact timing) for two Access clients to make conflicting changes. With 2 or 3 people you are *relatively* safe. With 12+ you will need to keep backups and use make use of the "Compact and Repair" function. In a share setup with 5 people I see minor corruption of indexes about once a year.
David