Protection modes

Protection modes specify read, write, and execute rights for a protected object and a given user.

Information about an object’s protection mode usually takes the form of a single-character abbreviation of each Boolean value in the protection mode; these abbreviations are displayed in Table 1.
Table 1. Protection mode for an HCL VersionVault object
User category Read permission Write permission Execute permission
Object owner Yes (r) or No (-) Yes (w) or No (-) Yes (x) or No (-)
Member of object’s group Yes (r) or No (-) Yes (w) or No (-) Yes (x) or No (-)
Other Yes (r) or No (-) Yes (w) or No (-) Yes (x) or No (-)

For example, suppose you are working in a view and want to see the protection mode for a directory element named lib. Suppose the owner and group of lib have read, write, and execute permission, but other users have only read and execute permissions. The cleartool describe command displays the mode, along with the elements owner (akp) and group (clearusers), as follows:

cleartool describe lib
...
  Element Protection:
    User : akp         rwx
    Group: clearusers  rwx
    Other:             r-x
...

In addition to these single-character abbreviations, integers are sometimes used to display object permissions in a compact form. For each user category (owner, group, and others), a single digit from 0 through 7 represents the permissions for that category, as described in Table 2.
Table 2. Protection mode digits for an HCL VersionVault object
Digit Read permission Write permission Execute permission
0 No No No
1 No No Yes
2 No Yes No
3 No Yes Yes
4 Yes No No
5 Yes No Yes
6 Yes Yes No
7 Yes Yes Yes
A sequence of three digits expresses the protection mode for an object, in this order: owner’s permissions, group’s permissions, others’ permissions. For example, the protection mode 750 for an object means that it has these permissions:
Digit User category Permissions
7 Owner Read, write, execute
5 Group Read, execute
0 Others None