English - United States  

Home




Usenet Posting #28 - Trigeminal Software, Inc. (English)



Subject: INFO: Access/Jet Compact and NT File Permissions!
(Originally posted in modified form 9/13/01)

There has been a lot of irresponsible talk about this subject, so here it is, published for all to see the truth. The principles, the problem, the responsibility, the solution, and the warning. Ignore it at your peril!

PRINCIPLES

Neither Access nor Jet touches file permissions. Period. Never has. I have actually been IN the source code and can guarantee this to be true. If you doubt it, then hook the darn security APIs and after you prove you are wrong, be sure to come back and tell us that you have proven it, okay? Anyone who can complain about the problem can fess up to being wrong if they find that they are, in my opinion.

PROBLEM

Some people have noticed that the file created by Jet does not always get the permissions they expect. Of course, the rules for the inheritance of permissions are not clearcut. Not only are there the general NT file security, inheritance, and policy issues, there is also whether the file is in the boot dir, in the root dir of a drive, where the temp dir is, version of the OS, and many other issues. Since neither Access nor Jet tries to change the setting, they are at the mercy of that myriad of factors.

RESPONSIBILITY

Whose job is to "fix" the problem? Well, since neither Access nor Jet claims to ever do anything here, they cannot be held responsible. Why should they, since NT permissions are not really compatible with Jet security? The only "bug" is in the user expectations. The "fix" is easy: accept reality, then look at your particular issue.

SOLUTION

Well, if you really *need* this to work, then there are two simple APIs: GetFileSecurity and SetFileSecurity, which will allow you to get the permissions of one file and apply them to another. You can actually look at the code samples page on this site and you will see a sample that will do this all for you!

WARNING

Please keep that incompatibility in mind! Jet security and NT file permissions are entirely unable to co-exist well, and attempts to mix them will lead to a lot more problems than actual solutions. The most useful thing you can do is just not bother. Truly!

Home

Problems with this site? Please contact the webmaster@trigeminal.com
with your comments, questions, or suggestions.