Add SELinux note after moving the binary in the self-hosting deployment guides - #3644
Add SELinux note after moving the binary in the self-hosting deployment guides#3644carlosupreme wants to merge 3 commits into
Conversation
On SELinux systems in enforcing mode (Fedora, RHEL, Rocky Linux,
AlmaLinux, CentOS Stream, Amazon Linux), the meilisearch binary keeps
the security context of the directory it was downloaded into after
`mv ./meilisearch /usr/local/bin/`. systemd then refuses to execute it:
Failed at step EXEC spawning /usr/local/bin/meilisearch: Permission denied
Add a note after the move step on the four self-hosting deployment
guides explaining the cause and the `restorecon` fix.
📝 WalkthroughWalkthroughThe four self-hosting deployment guides now include SELinux troubleshooting. They describe the systemd execution failure and show how to restore and verify the Meilisearch binary’s ChangesSELinux deployment guidance
Estimated code review effort: 2 (Simple) | ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@resources/self_hosting/deployment/aws.mdx`:
- Line 58: Update the SELinux failure notes in
resources/self_hosting/deployment/aws.mdx:58-58,
resources/self_hosting/deployment/digitalocean.mdx:51-51,
resources/self_hosting/deployment/gcp.mdx:48-48, and
resources/self_hosting/deployment/running_production.mdx:50-50 to explicitly
state before the failure description that mv preserves the binary’s source
SELinux context.
In `@resources/self_hosting/deployment/digitalocean.mdx`:
- Line 56: Update the restorecon command in
resources/self_hosting/deployment/digitalocean.mdx at lines 56-56 and
resources/self_hosting/deployment/running_production.mdx at lines 55-55 to
invoke restorecon with sudo, preserving the existing verbose flag and target
path.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: a3cd42c7-f1ca-4fdf-9f97-768df63f3bed
📒 Files selected for processing (4)
resources/self_hosting/deployment/aws.mdxresources/self_hosting/deployment/digitalocean.mdxresources/self_hosting/deployment/gcp.mdxresources/self_hosting/deployment/running_production.mdx
Description
Closes #3643
The four production deployment guides instruct users to move the binary into
/usr/local/bin. On systems running SELinux in enforcing mode (Fedora, RHEL, Rocky Linux, AlmaLinux, CentOS Stream, and Amazon Linux on the AWS page),mvpreserves the binary's original SELinux context instead of relabeling it for its destination. As a result, systemd cannot execute it, and step 4 fails with:The
chowncommand in step 2 does not fix this issue because file ownership and SELinux labels are separate. Therefore, a user following the guide exactly may end up with a service that does not start and an error that does not clearly indicate the cause.This PR adds a
<Note>immediately after the move step in each guide. It identifies the affected distributions, quotes the error message verbatim so it is searchable, links to step 4 where the failure occurs, and provides the following fix:Pages changed:
resources/self_hosting/deployment/running_production.mdxresources/self_hosting/deployment/aws.mdxresources/self_hosting/deployment/gcp.mdxresources/self_hosting/deployment/digitalocean.mdxThe note is duplicated across the four pages rather than extracted into a shared snippet, matching how the existing Meilisearch Cloud
<Note>is already repeated across them. Each copy usessudofor the command that restores the binary's SELinux context. The AWS version also lists Amazon Linux because that guide supports it.AI usage disclosure
AI tools were used to review the wording and consistency of the SELinux troubleshooting notes. The technical behavior and commands were manually verified.
Checklist
For internal Meilisearch team member only:
For external maintainers:
Summary by CodeRabbit
bin_tSELinux label across supported Linux distributions and deployment platforms.