Skip to content

Conversation

@lancepioch
Copy link
Member

@lancepioch lancepioch commented Feb 6, 2026

The install container runs as root, so all files created during installation are owned by root:root. Add a chown step in InstallationProcess.Run() immediately after the container finishes to set correct ownership, regardless of CheckPermissionsOnBoot.

Fixes pelican-dev/panel#2098

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Installation process enhanced with automatic file ownership normalization after setup completion. The system now ensures proper file permissions are applied following installation, improving system integrity and reliability. Any issues encountered during this step are logged for troubleshooting purposes, allowing the installation to continue without interruption.

The install container runs as root, so all files created during installation are owned by root:root. Add a chown step in InstallationProcess.Run() immediately after the container finishes to set correct ownership, regardless of CheckPermissionsOnBoot. Fixes pelican-dev/panel#2098
@lancepioch lancepioch self-assigned this Feb 6, 2026
@lancepioch lancepioch requested a review from a team as a code owner February 6, 2026 14:03
@coderabbitai
Copy link

coderabbitai bot commented Feb 6, 2026

📝 Walkthrough

Walkthrough

A post-installation file ownership normalization step is added to the installation flow. After executing the installation container, chown("/") is applied to the server filesystem. If chown fails, the operation logs a warning but continues without aborting the installation.

Changes

Cohort / File(s) Summary
Post-Install Ownership Normalization
server/install.go
Added file ownership correction via chown after container execution; logs non-fatal warnings on failure.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related issues

  • Pelican Egg Permission Issue – Breakdown panel#2098: This change directly implements the chown workaround described in the Pelican Egg Permission Issue, fixing server startup failures caused by incorrect file ownership (root:root) after installation by ensuring proper ownership normalization post-install.

Poem

🐰 A rabbit hops through permission trees,
With chown command and gentle breeze,
No more root-owned files in sight,
Now servers start up feeling right!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding a chown step after egg installation to fix file ownership issues.
Linked Issues check ✅ Passed The code changes directly address the core requirement from issue #2098: applying chown to fix file ownership after installation to ensure servers start without permission errors.
Out of Scope Changes check ✅ Passed The changes are limited to the intended scope: adding a post-install chown step in InstallationProcess.Run() with appropriate error handling, directly addressing the linked issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch lance/2098

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4586d7b and 903d58f.

📒 Files selected for processing (1)
  • server/install.go
🧰 Additional context used
🧬 Code graph analysis (1)
server/install.go (2)
server/server.go (1)
  • Server (31-83)
internal/ufs/filesystem.go (1)
  • Filesystem (11-168)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Analyze (go)
  • GitHub Check: Build and Test (ubuntu-22.04, 1.24.7, linux, amd64)
  • GitHub Check: Build and Test (ubuntu-22.04, 1.25.1, linux, amd64)
🔇 Additional comments (1)
server/install.go (1)

205-209: No concerns — the implementation correctly recurses through all directories and files.

The Chown method uses WalkDirat to recursively traverse the entire server filesystem tree and applies ownership changes to each entry. This ensures all files and directories (including nested ones created by the install script) are properly owned by the configured server user, fully resolving the issue.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@parkervcp
Copy link
Contributor

We ensure permissions on server start. This may be an issue with the filesystem code that is getting revamped by Dane and that we will likely adopt.

https://github.com/pelican-dev/wings/blob/main/server/power.go#L208

@parkervcp parkervcp closed this Feb 7, 2026
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.

Pelican Egg Permission Issue – Breakdown

2 participants