maqpna cp
Copy files to and from a session's sandbox (kubectl cp; privileged, audited)
Synopsis#
maqpna cp SESSION:PATH LOCAL | LOCAL SESSION:PATH [-n NS] [-c CONTAINER]Description#
cp runs kubectl cp against the session's pod (it uses pods/exec and tar in the container) after the RBAC check and records a PrivilegedAccess event. To read the files an agent produced through the gateway, use maqpna session files.
Flags#
| Flag | Type | Description | Default |
|---|---|---|---|
-c, --container | string | same as -c | agent |
-n, --namespace | string | namespace | default |
The global flags (--context, -o, --no-color, ...) work with every command.
Examples#
maqpna cp coder-x1:/workspace/report.md ./report.md -n team-aExit codes#
| Code | Meaning |
|---|---|
0 | success |
1 | error (the message says what failed, with a hint when there is one) |
2 | usage error: unknown flag, missing argument or bad value; the synopsis is printed |
3 | a check failed, a change is blocked, or a result did not match (tamper, policy mismatch) (not used by this command) |