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

File Delete Inhibit 2

Status
Not open for further replies.

nq

IS-IT--Management
Apr 1, 2002
102
AU
I have a multiuser MS Access database that resides on a Linux File Server - SuSE Enterprise ver 8
The directory is shared to Windows users via Samba.
Everything works correctly.
However, I would like to ensure that a user does not accidently delete the database. Is there any method of giving full rw access yet preventing deletion. Remember that Access creates a lock file in the same directory as the db and this file must be rw to all concurrent users.

nigel.
 
Then, no. The way to prevent deletion of the file is to make the directory it resides in -w, but that would prevent the creation of lock files.
 
You can also use the +i (indelible) file attribute in linux, but that REALLY ENFORCES read-only and doesn't support your needs.

You MIGHT (read MIGHT MIGHT MIGHT) be able to symlink in the working directory to where you keep the DB in another directory. An idiot who deletes the symlink doesn't delete the real file.

I have NO idea how Access will view that situation.

 
I must admit that Stefan's solution was my first thought, perhaps coupled with some degree of transaction logging in the event of having to roll back the database.
 
Thanks for all the suggestions.

I definitely have backups - scheduled every day. That's how I recovered when this first happened.

The symbolic link was the solution and it works perfectly. I moved the database to another directory, made the symlink in the original Samba shared directory and both users and Access didn't know the difference. The lock file is created in the shared directory with the symlink. If the symlink is deleted, it takes a few seconds to re-create it and no data is lost. The original db can't be reached by normal users. This also means that no data is lost between backup time and deletion of the db.

Nigel.
 
Good stuff, Nigel, and useful for anyone else in the same situation. Another star for thedaver!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top