From 903d58f6756d06d752bbb480cf7d7041985bbf51 Mon Sep 17 00:00:00 2001 From: Lance Pioch Date: Fri, 6 Feb 2026 09:01:47 -0500 Subject: [PATCH] Fix file ownership after egg installation 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 https://github.com/pelican-dev/panel/issues/2098 --- server/install.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/install.go b/server/install.go index fc0a29de..5d9dc154 100644 --- a/server/install.go +++ b/server/install.go @@ -202,6 +202,12 @@ func (ip *InstallationProcess) Run() error { return err } + // Ensure correct file ownership after installation since the install + // container runs as root, leaving all files owned by root:root. + if err := ip.Server.Filesystem().Chown("/"); err != nil { + ip.Server.Log().WithField("error", err).Warn("failed to chown server root directory after installation") + } + // If this step fails, log a warning but don't exit out of the process. This is completely // internal to the daemon's functionality, and does not affect the status of the server itself. if err := ip.AfterExecute(cID); err != nil {