Object

Permissions Class

Enables you to test, set, and clear the permissions of FolderItems in operating systems that support this concept (Mac OS X and Linux). You can get and set the permissions of a FolderItem as an octal Integer via the Permissions property of the FolderItem class.

Properties
GIDBit | OtherWrite
GroupExecute | OwnerExecute
GroupRead | OwnerRead
GroupWrite | OwnerWrite
OtherExecute | StickyBit
OtherRead | UIDBit

# Notes

# Constructor

You must pass the Integer permissions value of the FolderItem in the Permissions constructor. For example:

Dim perms as New Permissions(FolderItem1.Permissions)

On Unix-based operating systems, permissions can be represented as a three-digit numeric code, in which each digit ranges from 0 to 7 (a.k.a, octal number). The digits correspond to the permissions of the FolderItem Owner, the owning Group, and Other users not in the owning Group, in that order, from left to right.

The code for each digit is computed using the following values:

Value | Permission Type | Description
--- | --- | ---
4 | Read permissions | User or group can open and read the FolderItem.
2 | Write permissions | User or group can open and write to the FolderItem.
1 | Execute permissions | User or group can execute the file or read the directory.

For directories, Execute permissions means that the user or group can list the contents of the directory and examine the files that the user has permission to read.

For each digit, the permissions are expressed by adding up the values. Each digit can take on eight possible values:

Value | Description
--- | ---
0 | No permissions
1 | Execute permissions
2 | Write permissions
3 | Write and Execute permissions
4 | Read permissions
5 | Read and Execute permissions
6 | Read and Write permissions
7 | Read, Write, and Execute permissions

For example, the code "764" is interpreted as follows:

Value | User Type | Description
--- | --- | ---
7 | Owner | Read, Write, and Execute permissions
6 | Group | Read and Write permissions
4 | Others | Read permissions

# See Also

FolderItem class.