mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-09-16 23:10:47 +03:00
The stop-time permission pass necessarily runs before the container's processes exit, so files written during the shutdown window (syslog archives, trace flushes) and after any SIGKILL path stay owned by root on the host. An unprivileged server can neither chown nor delete them, which broke node deletion and project deletion. Reclaim them through the only privilege door a non-root server has: a one-shot throwaway container of the node's own image, entrypoint overridden to the GNS3 busybox (nothing of the guest boots), chowning the node directory back to the server user. It runs at the end of close() — project deletion rmtrees the directory right after the nodes close, so close must leave a clean tree — and as a retry fallback in delete(). The helper resolves the image by its create-time ID with --pull=never, so a stale or retagged image name cannot turn into a registry pull attempt.