Skip to content
ghostshell

Audit mode

How the central root-only store works - the daemon, /var/lib/ghostshell layout, per-user listings, the tree view, and fail-open ingest.

When ghostshell-daemon runs (it does after a package install), ghostshell rec streams the cast to it over /run/ghostshell-daemon.sock. The recording is written by root to /var/lib/ghostshell/<user>/<sessionid>.cast (root:root 0600, directories 0700). Normal users cannot read other users' — or their own — recordings. See the security model for the full trust boundary.

List users and sessions

console
$ sudo ghostshell ls --all USER SESSIONS LAST ACTIVE root 1 2026-05-28 17:09 alice 7 2026-05-27 14:03 $ sudo ghostshell ls --user alice STATUS TYPE SESSION STARTED DURATION COMMAND SAVED non-interactive 20260526T145020-1413240.cast 2026-05-26 14:50:19 3s /bin/bash -c echo deploy-step-1; whoami

The TYPE column distinguishes an interactive login shell from a non-interactive command session. DURATION is the recorded length; an in-progress session shows elapsed-so-far with a trailing +.

Tree view

console
$ sudo ghostshell tree /var/lib/ghostshell ├─ root └─ 20260526T124229-1909275.cast [SAVED interactive] 2026-05-26 12:42:29 17m28s /bin/bash └─ alice └─ 20260526T145020-1413240.cast [SAVED non-interactive] 2026-05-26 14:50:19 3s /bin/bash -c echo deploy-step-1; whoami

ghostshell tree <id> does something different — it prints a session's process tree. See process tree and analyze.

Fail-open ingest

If the daemon is unreachable, rejects the session (per-user session cap, store full), or is wedged, ghostshell rec records to the user-local directory (~/.local/share/ghostshell) instead. On its next startup, the daemon ingests those files into the central store. The daemon replies OK only once a session is actually registered, so the recorder can tell a real central session from a rejection — a recording is never silently lost, and a login is never blocked.

What you can do from here

Store location and daemon behavior are tunable — see configuration.

Source of truth: README on GitHub