The enum class type perms is a bitmask type that specifies bitmask constants used to identify file permissions, with the meanings listed in Table 125.
Name | Value | POSIX | Definition or notes |
(octal) | macro | ||
none | 0 | There are no permissions set for the file. | |
owner_read | 0400 | S_IRUSR | Read permission, owner |
owner_write | 0200 | S_IWUSR | Write permission, owner |
owner_exec | 0100 | S_IXUSR | Execute/search permission, owner |
owner_all | 0700 | S_IRWXU |
Read, write, execute/search by owner; owner_read | owner_write | owner_exec |
group_read | 040 | S_IRGRP | Read permission, group |
group_write | 020 | S_IWGRP | Write permission, group |
group_exec | 010 | S_IXGRP | Execute/search permission, group |
group_all | 070 | S_IRWXG |
Read, write, execute/search by group; group_read | group_write | group_exec |
others_read | 04 | S_IROTH | Read permission, others |
others_write | 02 | S_IWOTH | Write permission, others |
others_exec | 01 | S_IXOTH | Execute/search permission, others |
others_all | 07 | S_IRWXO |
Read, write, execute/search by others; others_read | others_write | others_exec |
all | 0777 | owner_all | group_all | others_all | |
set_uid | 04000 | S_ISUID | Set-user-ID on execution |
set_gid | 02000 | S_ISGID | Set-group-ID on execution |
sticky_bit | 01000 | S_ISVTX | Operating system dependent. |
mask | 07777 | all | set_uid | set_gid | sticky_bit | |
unknown | 0xFFFF | The permissions are not known, such as when a file_status object is created without specifying the permissions |