Provision logi-owned W2MO DB folders on managed hosts - #1
Draft
jplapp wants to merge 1 commit into
Draft
Conversation
On hosts with /data/mysql_data, re-own the DB tree (and mysql_backup) to logi:logi with setgid group-writable dirs, and make the w2mo_autoupdate state dir and autoupdate/server config files group-writable. Together with deploy/linux/update_w2mo.sh starting whdb as the logi user, every logi-group member can run W2MO updates without root -- no sudoers changes needed. A find probe keeps the recursive migration a no-op on already-migrated hosts; /data/appconfig_static/certs stays untouched. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
On managed hosts that have
/data/mysql_data(i.e. W2MO hosts),deploy.shnow:/data/mysql_dataand/data/mysql_backuptologi:logiwith setgid, group-writable dirs (2775/g+rwX) — afind ! -user logiprobe keeps the recursive pass a no-op on already-migrated hosts;w2mo_autoupdatestate dir and makesw2mo_autoupdate.conf/server.settingsgroup-writable;/data/appconfig_static(setgid + group) —certs/and everything else inside stay untouched.No sudoers changes: this replaces the need for root in the W2MO update scripts entirely.
Why
whdb containers now run as the
logihost user (logivations/deploy#358 + logivations/w2mo#27824), so DB files land logi-owned and group-writable. This is the one-time host-side migration + ongoing enforcement that lets every logi-group member update/back up/restore/prune W2MO setups with plain file operations instead of sudo.Testing
bash -nclean./data(root-owned0700/0600DB tree, config files,certs/): first run migrates tologi:logi 2775/0660, second run is a silent no-op,certs/untouched (root:root 755).🤖 Generated with Claude Code