30 Input/output library [input.output]

30.10 File systems [filesystems]

30.10.29 Enumerations [fs.enum] Enum class perms [fs.enum.perms]

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.

Table 125 — Enum class perms
NameValuePOSIXDefinition or notes
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