File path sensors · GraphQL type

PosixFileMode type

A file's POSIX permission bits decoded into several complementary forms. The string field uses the standard ls(1) symbolic rendering (e.g. drwxr-sr-x), where setuid/setgid appear as s/S in the user/group execute position and the sticky bit as t/T in the other execute position.

Fields

Field Name Description
octal - String! The mode as a 4-digit octal string, special bits first (e.g. 0755, 4755 for setuid).
string - String! The standard ls(1) symbolic rendering (e.g. -rwxr-xr-x, drwxr-sr-x).
user - FilePermission! The owning user's read/write/execute permissions.
group - FilePermission! The owning group's read/write/execute permissions.
other - FilePermission! All other users' read/write/execute permissions.
setuid - Boolean! True when the setuid bit is set: the file executes with its owner's privileges.
setgid - Boolean! True when the setgid bit is set: the file executes with its group's privileges (or a directory's children inherit its group).
sticky - Boolean! True when the sticky bit is set: on a directory, only a file's owner may delete or rename it.

Used by

  • EndpointPathEntryStats type: The stat record of one file a PathSensor discovered, stored as alternate data on the owning EndpointPath object and retrieved with…

Example

Example

{
  "octal": "abc123",
  "string": "xyz789",
  "user": FilePermission,
  "group": FilePermission,
  "other": FilePermission,
  "setuid": true,
  "setgid": true,
  "sticky": false
}