|
9 | 9 | --
|
10 | 10 | -- change file mode bits.
|
11 | 11 |
|
| 12 | +-- TODO: change this module to Chmod.Posix and later create a portable module. |
| 13 | +-- |
| 14 | +-- Design notes: |
| 15 | +-- |
| 16 | +-- On Posix systems: |
| 17 | +-- |
| 18 | +-- Roles: User (Owner), group (only one), others |
| 19 | +-- Permissions: rwxX(ugo), s(go), t(o) |
| 20 | +-- |
| 21 | +-- 1. write: create or delete a file in a directory. Modify contents of a file. |
| 22 | +-- 2. write: modify metadata of a directory or file. |
| 23 | +-- 3. execute: to list a directory's contents |
| 24 | +-- |
| 25 | +-- On Windows: |
| 26 | +-- |
| 27 | +-- Could not find any good docs by microsoft on a google search. |
| 28 | +-- Managing permissions: https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc770962(v=ws.11) |
| 29 | +-- https://learn.microsoft.com/en-us/windows/security/identity-protection/access-control/access-control |
| 30 | +-- |
| 31 | +-- Roles: User (Owner), group (many) |
| 32 | +-- Permissions: read, read+execute, modify (metadata, create/delete files in |
| 33 | +-- dirs), write (write to a file), list dir, full control |
| 34 | +-- Inheritance: permissions can be inherited from parent directories |
| 35 | +-- Advanced Permissions: ... |
| 36 | +-- |
| 37 | +-- 1. write: create or delete a file in a directory. Modify contents of a file. |
| 38 | +-- 2. modify: modify metadata of a directory or file. |
| 39 | +-- 3. list dir: to list a directory's contents |
| 40 | +-- |
| 41 | +-- Common abstraction for windows/posix: |
| 42 | +-- |
| 43 | +-- Roles: User/Owner |
| 44 | +-- Permissions: |
| 45 | +-- |
| 46 | +-- 1. write on Posix: write+modify on windows |
| 47 | +-- 2. execute on dir: "list dir" on windows |
| 48 | +-- |
| 49 | +-- Other's default permissions are controlled by umask on Posix. When setting |
| 50 | +-- permissions we can ensure that other's permissions are less restrictive than |
| 51 | +-- the owner? But we cannot do the same on windows. |
| 52 | + |
12 | 53 | module Streamly.Coreutils.Chmod
|
13 | 54 | ( chmod
|
14 | 55 | )
|
|
0 commit comments