Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Compacting Access file resets NTFS permissions


Moderate: Requires basic macro, coding, and interoperability skills.


This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).


↑ Back to the top


Symptoms

After you compact a Microsoft Access database or an Access project that exists in a folder in an NTFS file system partition, you may notice that the custom NTFS permissions for the Access database file (.mdb) or for the Access project file (.adp) are reset unexpectedly.

Also, when you try to open the compacted Access database file (.mdb) or the Access project file (.adp), you may receive one of the following error messages:
  • The Microsoft Jet database engine cannot open the file '<fullPathToFile>'. It is already opened exclusively by another user, or you need permission to view its data.
  • Microsoft Office Access can't find the database file '<fullPathToFile>.'

    Make sure you entered the correct path and filename.
  • Microsoft Office Access can't find the database file '<fullPathToFile>.'

    Make sure you entered the correct path and filename.

↑ Back to the top


Cause

The compact process always compacts the source Access database file or the Access project file to a new file. The newly created file inherits NTFS permissions that are different from the source file. The inheritance of the NTFS permissions is based on the version of Access that is used to compact the file.

Access 2000

In Microsoft Access 2000, the newly created file automatically inherits the default NTFS permissions of the TEMP folder that corresponds to the currently logged-in user account.

To obtain the path of the TEMP folder that corresponds to the currently logged-in user account, type Echo %TEMP% at the command prompt.

Note By default, the path of the TEMP folder is C:\Documents and Settings\<UserAccountName>\Local Settings\Temp where <UserAccountName> is the name of the user account that is currently logged in.

Access 2002 or Office Access 2003

In Access 2002 or in Office Access 2003, the newly created file automatically inherits the default NTFS permissions of the parent folder of the Access database file or of the Access project file.

↑ Back to the top


Workaround

To work around the problem, use either of the following methods, depending on the version of Access that you are running:

Access 2000

You may assign appropriate permissions to the TEMP folders that correspond to all the user accounts of the computer.

Access 2002 or Office Access 2003

You may assign appropriate permissions to the parent folder of the Access database file or of the Access project file.

↑ Back to the top


More Information

Steps to reproduce the behavior

Note The following steps assume that you are running Access on a Microsoft Windows 2000-based computer or on a Microsoft Windows NT 4.0 Service Pack 6-based computer. The following steps assume also that you are familiar with creating NTFS partitions and with setting file-level permissions on files on an NTFS partition.
  1. Start Access.
  2. On the File menu, click New.
  3. In the New File task pane, click Blank Database.
  4. In the File New Database dialog box, locate a folder in an NTFS partition.
  5. Type a file name for the new database, and then click Create.
  6. Close the database, and then quit Access.
  7. In Windows Explorer, locate the folder where you created the database in step 5.
  8. Click the database, and then click Properties on the File menu.
  9. In the Properties dialog box, click the Security tab.
  10. Customize the permissions for a particular account, and then click OK.

    For example, add a test user account, and then give Full Control permissions to the user account.
  11. Start Access, and then open the database that you created in step 5.
  12. On the Tools menu, point to Database Utilities, and then click Compact and Repair Database.
  13. Close the database, and then quit Access.
  14. In Windows Explorer, locate the folder where you created the database in step 5.
  15. Click the database file, and then click Properties on the File menu.
  16. In the Properties dialog box, click the Security tab.

    Notice that the custom permissions that you set in step 10 have been reset.

↑ Back to the top


References

For additional information about NTFS partitions and about using security in Windows 2000 or in Windows NT 4.0, see your Windows 2000 documentation or your Windows NT 4.0 documentation.

↑ Back to the top


Keywords: kbsweptsoltax, kbbillprodsweep, kbprb, kb, kbarchive

↑ Back to the top

Article Info
Article ID : 295234
Revision : 3
Created on : 4/23/2018
Published on : 4/23/2018
Exists online : False
Views : 192