Skip to content

Hand the venv and checkout to the ops group - #7

Merged
mikelangmayr merged 1 commit into
mainfrom
mike/operator-writable-tree
Oct 16, 2026
Merged

mikelangmayr merged 1 commit into
mainfrom
mike/operator-writable-tree

Conversation

@mikelangmayr

Copy link
Copy Markdown
Contributor
  • The venv was user:user and the checkout root-owned, so an operator could not pull, hotfix, or import a driver to test it. Updating a host needed sudo git pull, and pip install -e failed outright.
  • install now gives both trees to the daemon account with the ops group writable, and setgid on directories so anything created later keeps the group rather than the creating operator's own.
  • It grants no privilege they lack. Operators already edit /etc/hispec configs and restart daemons, so they already decide what the daemons run.
  • Also registers the checkout as a git safe.directory. Since 2.35.2 git refuses a repository whose owner is not the caller, which group permissions do not satisfy, so the chown alone would leave git pull broken in a new way.
  • Execute bits are preserved, so the venv keeps its interpreter, and plain files do not become executable.
  • Six tests, checked against a regression: dropping the mode change fails two of them. The setgid assertion skips on macOS, which strips it for a non-root caller.

@mikelangmayr
mikelangmayr merged commit 7d31ae8 into main Oct 16, 2026
2 checks passed
@mikelangmayr
mikelangmayr deleted the mike/operator-writable-tree branch October 16, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants