Ace Object

An ACE object represents an Access Control Entry for the Windows NT File System (NTFS). The process must have permission to change permissions when updating this object.  For more information see Security Considerations.

 

 

  Properties

Inheritance, Permissions (default property), TrusteeName, TrusteeType


Inheritance

A bit string indicating the permission inheritance granted for the Trustee.  This only applies to directories.  The inhertance will set the default permissions for any files created in the directory.

Access: Write
Default: None

Notes: Inheritance values are:

Constant Value Description
AF_INHERIT_NONE 0 No permissions are inherited.
AF_INHERIT_ALL 1 The current directory permissions are inherited by the file.
AF_INHERIT_EXECUTE 2 Only execute permission is inherited.
AF_INHERIT_WRITE 4 Only write permission is inherited.
AF_INHERIT_READ 8 Only read permission is inherited.

 

Example: The following example shows how to turn on execute inheritance:

' Code showing initialization of the ACE object omitted
ACE.Inheritance = AF_INHERIT_EXECUTE

Permissions

A bit string indicating the permissions granted for the Trustee.
This property is the default property of the ACE object.

Access: Read/Write
Default: None

Notes: Permission values are:

Constant Value Description
AF_PERMIT_NONE 0 This is actually a constant and indicates that access to the resource is explicitly denied.
AF_PERMIT_READ 1 Read permission is allowed.
AF_PERMIT_WRITE 2 Write permission is allowed.
AF_PERMIT_EXECUTE 4 Execute permission is allowed.
AF_PERMIT_DELETE 8 Delete permission is allowed.
AF_PERMIT_CHANGEPERMISSIONS 16 The ability to change permissions of any ACE is allowed.
AF_PERMIT_CHANGEOWNER 32 The ability to change ownership is allowed.
AF_PERMIT_FULLCONTROL 63 This is actually a constant and indicates that full control over the resource is allowed.

Because the Permissions property is the default property for the ACE object, the following lines of code are equivalent:

Permissions = ACE.Permissions
Permissions = ACE

Example 1: The following example shows how to test for read permission:

' Code showing initialization of the ACE object omitted
If ACE.Permissions And AF_PERMIT_READ Then
    Response.Write "ACE includes read permission<BR>"
Else
    Response.Write "ACE does not include read permission<BR>"
End If

Example 2: The following example shows how to turn on execute permission:

' Code showing initialization of the ACE object omitted
ACE.Permissions = ACE.Permissions Or AF_PERMIT_EXECUTE

TrusteeName

String value of the name of the Trustee (User or Group) that the ACE is associated with.

Access: Read
Default: None

Notes: This property is the name of the trustee that the ACE belongs to. This trustee may be either a user or group as specified by the TrusteeType property.

Example: The following example shows how to display the trustee name for the ACE:

' Code showing initialization of the ACE object omitted
Response.Write "Trustee name = " & ACE.TrusteeName

See Also: ACE.TrusteeType property

TrusteeType

A number indicating the Trustee Type

Access: Read
Default: None

Notes: The TrusteeType for an ACE identifies whether the Trustee is a group or user based on the following values:

Constant Value Description
AF_TRUSTEE_IS_UNKNOWN 0 Unknown
AF_TRUSTEE_IS_USER 1 Trustee is an NT user
AF_TRUSTEE_IS_GROUP 2 Trustee is an NT group

Example: The following example shows how to display the trustee type for the ACE:

' Code showing initialization of the ACE object omitted
Response.Write "Trustee type = " & ACE.TrusteeType

See Also: ACE.TrusteeName property

 

 

File Upload File Download File Upload File Download File Upload File Download File Upload File Download File Upload File Download File Upload File Download ASP .NET Drag n Drop Java Mac OS X