mirror of
https://github.com/games-on-whales/LXC2Docker.git
synced 2026-10-15 12:52:04 +00:00
[PR #147] [MERGED] fix(lxc): make a mounted socket's parent dir traversable for non-root plugin UIDs #147
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/LXC2Docker#147
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/games-on-whales/LXC2Docker/pull/147
Author: @JBailes
Created: 7/20/2026
Status: ✅ Merged
Merged: 7/20/2026
Merged by: @JBailes
Base:
main← Head:fix/socket-dir-traversable-for-nonroot-plugins📝 Commits (1)
76bd841fix(lxc): make a mounted socket's parent dir traversable for non-root plugin uids📊 Changes
2 files changed (+45 additions, -0 deletions)
View changed files
📝
internal/lxc/config.go(+15 -0)📝
internal/lxc/config_test.go(+30 -0)📄 Description
appendSocketMountchmods a shared socket to0777so any UID inside an LXC container canconnect()to it (each container has its own UID view). But it left the socket's parent directory alone. That parent is created under the daemon's service umask — systemd hardening commonly setsUMask=0027— which strips group/other execute and leaves e.g./run/smoothnas-runtimeat0750.A plugin process running as a non-root UID then gets
EACCESon the socket path even though the socket itself is world-accessible, because it cannot traverse the0750directory. Live symptom on a SmoothNAS host: the runtime docker socket became unreachable to the (non-root) aimee-server plugin after every runtime restart, needing a manualchmod o+rxeach time.Fix: add group+other
r-xto the socket's parent (preserving owner bits;Chmodignores the umask) alongside the existing socket chmod. It runs on every container (re)creation, so it self-heals across daemon restarts. Unit-tested (TestAppendSocketMountMakesParentDirTraversable).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.