serve
verbmutateServe a place of a store as WebDAV on this computer, so that an operating system mounts it: it listens on the loopback with a token it prints to standard error, until it is stopped.
Program anyfs-reader. Origin anyfs.
Governance: the action
What the verb is and may do, as governance says it. Each annotation is expressed by the surfaces or says why it is not.
| Property | Value |
|---|---|
kind | action |
effect | mutate |
idempotent | false |
audience | both |
tier | writer |
dryRun | true |
check | false |
reachChannels | local |
reachReadOnly | false |
reachNeedsTty | false |
reachRunsAs | caller |
reachConfirmation | none |
Operands
| Operand | Meaning |
|---|---|
LOCATION | The place to serve: a mount, a folder, an address; a directory below the root of a store is served as the root. |
Options
| Option | Meaning | Properties |
|---|---|---|
--port | The port to listen on; a free one where it is left out. | type=value, required=false, standard=false, humanOnly=false, valueName=N |
--listen | An address to listen on instead of the loopback; needs --allow-host. | type=value, required=false, standard=false, humanOnly=false, valueName=ADDRESS |
--allow-host | The host names that may be asked for when the address is not the loopback (the Host header), so that a page of another site cannot reach the server. | type=value, required=false, standard=false, humanOnly=false, valueName=HOST[,HOST] |
--read-only | Serve nothing that changes the store, whatever the store can do. | type=flag, required=false, standard=false, humanOnly=false, negatable=false, default=false |
--nfs | Serve as NFS version 3 on the loopback instead of WebDAV: no token (the callers are the uid of this account and root), and the mount command is printed. | type=flag, required=false, standard=false, humanOnly=false, negatable=false, default=false |
--nfs-attributes | With --nfs: what to do with a mode, an owner or a time the store cannot keep: accept it without effect and count it (default), or refuse it. | type=value, required=false, standard=false, humanOnly=false, valueName=refuse|ignore |
--json | Write one JSON document and nothing else for a person. | type=flag, required=false, standard=true, humanOnly=false, negatable=false, default=false |
--quiet | Show only how it ended. | type=flag, short=q, required=false, standard=true, humanOnly=false, negatable=false, default=false |
--verbose | Show every step as it happens. | type=flag, short=v, required=false, standard=true, humanOnly=false, negatable=false, default=false |
--color | Use colour where the terminal shows it (--no-color turns it off). | type=flag, required=false, standard=true, humanOnly=false, negatable=true, default=true |
--non-interactive | Never ask a question: where one is needed, fail and say so. | type=flag, required=false, standard=true, humanOnly=false, negatable=false, default=false |
--dry-run | Show what would change and change nothing. | type=flag, required=false, standard=true, humanOnly=false, negatable=false, default=false |
Examples
anyfs serve fleet:/ # Serve the mount fleet as WebDAV on the loopback, with the address and the token on standard error.
anyfs serve --read-only --port 8080 ./docs # Serve a folder read-only on port 8080.Physical: what it is drawn as
Not drawn by any surface for this tier.
Not drawn
- cli: serve is for the tier writer; this caller holds reader
- mcp: serve is for the tier writer; this caller holds reader
- rest: serve is for the tier writer; this caller holds reader