diff --git a/environment/docker/power.go b/environment/docker/power.go index d08076d..6187d83 100644 --- a/environment/docker/power.go +++ b/environment/docker/power.go @@ -102,19 +102,6 @@ func (e *Environment) Start() error { return errors.WithStack(err) } - // Update the configuration files defined for the server before beginning the boot process. - // This process executes a bunch of parallel updates, so we just block until that process - // is completee. Any errors as a result of this will just be bubbled out in the logger, - // we don't need to actively do anything about it at this point, worst comes to worst the - // server starts in a weird state and the user can manually adjust. - // e.Server.UpdateConfigurationFiles() - // - // // Reset the permissions on files for the server before actually trying - // // to start it. - // if err := e.Server.Filesystem.Chown("/"); err != nil { - // return errors.WithStack(err) - // } - ctx, cancel := context.WithTimeout(context.Background(), time.Second*10) defer cancel() diff --git a/server/power.go b/server/power.go index 3ead824..ab868fb 100644 --- a/server/power.go +++ b/server/power.go @@ -143,7 +143,19 @@ func (s *Server) onBeforeStart() error { return errors.New("cannot start server, not enough disk space available") } + // Update the configuration files defined for the server before beginning the boot process. + // This process executes a bunch of parallel updates, so we just block until that process + // is completee. Any errors as a result of this will just be bubbled out in the logger, + // we don't need to actively do anything about it at this point, worst comes to worst the + // server starts in a weird state and the user can manually adjust. + s.PublishConsoleOutputFromDaemon("Updating process configuration files...") s.UpdateConfigurationFiles() + s.PublishConsoleOutputFromDaemon("Ensuring file permissions are set correctly, this could take a few seconds...") + // Ensure all of the server file permissions are set correctly before booting the process. + if err := s.Filesystem.Chown("/"); err != nil { + return errors.WithMessage(err, "failed to chown root server directory during pre-boot process") + } + return nil } \ No newline at end of file