From 6d7ab865d71b7d8ebdd6c47d64c664ba29a4db92 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Mon, 25 May 2020 15:51:36 -0700 Subject: [PATCH] Fix SFTP default configuration; closes pterodactyl/panel#2045 --- cmd/root.go | 6 ++---- config/config.go | 3 --- config/config_system.go | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index 1f2edd1..144cc87 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -196,10 +196,8 @@ func rootCmdRun(*cobra.Command, []string) { // Wait until all of the servers are ready to go before we fire up the HTTP server. wg.Wait() - // If the SFTP subsystem should be started, do so now. - if c.System.Sftp.UseInternalSystem { - sftp.Initialize(c) - } + // Initalize SFTP. + sftp.Initialize(c) // Ensure the archive directory exists. if err := os.MkdirAll(c.System.ArchiveDirectory, 0755); err != nil { diff --git a/config/config.go b/config/config.go index f79b0f0..2490a27 100644 --- a/config/config.go +++ b/config/config.go @@ -84,9 +84,6 @@ type Configuration struct { // Defines the configuration of the internal SFTP server. type SftpConfiguration struct { - // If set to false, the internal SFTP server will not be booted and you will need - // to run the SFTP server independent of this program. - UseInternalSystem bool `default:"true" json:"use_internal" yaml:"use_internal"` // If set to true disk checking will not be performed. This will prevent the SFTP // server from checking the total size of a directory when uploading files. DisableDiskChecking bool `default:"false" yaml:"disable_disk_checking"` diff --git a/config/config_system.go b/config/config_system.go index b5f6095..968988b 100644 --- a/config/config_system.go +++ b/config/config_system.go @@ -51,7 +51,7 @@ type SystemConfiguration struct { // the user did not press the stop button, but the process stopped cleanly. DetectCleanExitAsCrash bool `default:"true" yaml:"detect_clean_exit_as_crash"` - Sftp *SftpConfiguration `yaml:"sftp"` + Sftp SftpConfiguration `yaml:"sftp"` } // Ensures that all of the system directories exist on the system. These directories are