package fileutils

  1. Overview
  2. Docs

Module FileUtil.ModeSource

Permission symbolic mode.

Sourcetype who = [
  1. | `User
  2. | `Group
  3. | `Other
  4. | `All
]
Sourcetype wholist = [
  1. | who
  2. | `List of who list
]
Sourcetype permcopy = [
  1. | `User
  2. | `Group
  3. | `Other
]
Sourcetype perm = [
  1. | `Read
  2. | `Write
  3. | `Exec
  4. | `ExecX
  5. | `Sticky
  6. | `StickyO
]
Sourcetype permlist = [
  1. | perm
  2. | `List of perm list
]
Sourcetype actionarg = [
  1. | permlist
  2. | permcopy
]
Sourcetype action = [
  1. | `Set of actionarg
  2. | `Add of actionarg
  3. | `Remove of actionarg
]
Sourcetype actionlist = [
  1. | action
  2. | `List of action list
]
Sourcetype clause = [
  1. | `User of actionlist
  2. | `Group of actionlist
  3. | `Other of actionlist
  4. | `All of actionlist
  5. | `None of actionlist
]
Sourcetype 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]))