package fileutils

  1. Overview
  2. Docs

Permission symbolic mode.

type who = [
  1. | `User
  2. | `Group
  3. | `Other
  4. | `All
]
type wholist = [
  1. | who
  2. | `List of who list
]
type permcopy = [
  1. | `User
  2. | `Group
  3. | `Other
]
type perm = [
  1. | `Read
  2. | `Write
  3. | `Exec
  4. | `ExecX
  5. | `Sticky
  6. | `StickyO
]
type permlist = [
  1. | perm
  2. | `List of perm list
]
type actionarg = [
  1. | permlist
  2. | permcopy
]
type action = [
  1. | `Set of actionarg
  2. | `Add of actionarg
  3. | `Remove of actionarg
]
type actionlist = [
  1. | action
  2. | `List of action list
]
type clause = [
  1. | `User of actionlist
  2. | `Group of actionlist
  3. | `Other of actionlist
  4. | `All of actionlist
  5. | `None of actionlist
]
type t = clause list

Typical symbolic mode:

  • g+r -> `Group (`Add `Read)
  • u=rw,g+rw,o-rwx -> `User (`Set (`List [`Read; `Write])); `Group (`Add (`List [`Read; `Write])); `Other (`Remove (`List [`Read; `Write; `Exec]))
OCaml

Innovation. Community. Security.