Check XDG_RUNTIME_DIR is writable, not just set
SSH sessions may export XDG_RUNTIME_DIR=/run/user/<uid> even when that directory doesn't exist or isn't writable. Check writability rather than emptiness before falling back to /tmp/podman-<uid>. https://claude.ai/code/session_01FKCW3FDjNFj6jve4niMFXH
This commit is contained in:
parent
139a03c774
commit
cf50332a8f
1 changed files with 1 additions and 1 deletions
|
|
@ -66,7 +66,7 @@ echo "[hiy] Generated proxy/caddy.json for ${DOMAIN_SUFFIX}"
|
||||||
# shells. Podman uses XDG_RUNTIME_DIR for RunRoot, events dirs, and the
|
# shells. Podman uses XDG_RUNTIME_DIR for RunRoot, events dirs, and the
|
||||||
# default socket path, so we must set it to something writable before any
|
# default socket path, so we must set it to something writable before any
|
||||||
# podman invocation.
|
# podman invocation.
|
||||||
if [ -z "${XDG_RUNTIME_DIR:-}" ]; then
|
if [ ! -d "${XDG_RUNTIME_DIR:-}" ] || [ ! -w "${XDG_RUNTIME_DIR:-}" ]; then
|
||||||
export XDG_RUNTIME_DIR="/tmp/podman-$(id -u)"
|
export XDG_RUNTIME_DIR="/tmp/podman-$(id -u)"
|
||||||
mkdir -p "$XDG_RUNTIME_DIR"
|
mkdir -p "$XDG_RUNTIME_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue