AllowAccess Method

Object: Folder
Syntax: AllowAccess ([in] AccountName, [in] Permissions [PermissionType])
Description: This method creates an Access Control Entry (ACE) for the current folder that allows specific access.

The AccountName must resolve to a valid NT account in the domain.

The Permissions can have any of the following values or any logical combination of the following values:

ConstantValueDescription
saNoAccess1All Access is denied.
saRead2The file can be read.
saWrite4The file can be written.
saExecute8The file can be executed.
saDelete16The file can be deleted.
saPermissions32Permissions on the file can be changed.
saOwner64Allows taking ownership of the file.
saFull126Allows all of the above permissions (except NoAccess).
saList
(Windows 2000 only)
256Folder content list can be viewed.
saReadExecute
(Windows 2000 only)
512The file can be read and executed.
saModify
(Windows 2000 only)
1024The file can be modified.

These constants can be found using the IIS 4 or later TypeLibrary feature, or by viewing the vbFileManagerInclude.asp file contained in the .\Samples\FileManagerSamplesdirectory.

PermissionType is an optional parameter. By default, its value is 3. If set to 1, permission is for files. If set to 2, permission is for directories. If 3, permission is for both files and directories.

Copyright © 2010 SoftArtisans, Inc. All rights reserved.