SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
fix sftp start with filer (#7120)
Chris Lu605b3333c130
diff --git a/weed/command/filer.go b/weed/command/filer.goindex 1b7065a73b..053c5a1472 100644--- a/weed/command/filer.go+++ b/weed/command/filer.go@@ -157,6 +157,8 @@ func init() {filerSftpOptions.clientAliveInterval = cmdFiler.Flag.Duration("sftp.clientAliveInterval", 5*time.Second, "interval for sending keep-alive messages")filerSftpOptions.clientAliveCountMax = cmdFiler.Flag.Int("sftp.clientAliveCountMax", 3, "maximum number of missed keep-alive messages before disconnecting")filerSftpOptions.userStoreFile = cmdFiler.Flag.String("sftp.userStoreFile", "", "path to JSON file containing user credentials and permissions")+ filerSftpOptions.dataCenter = cmdFiler.Flag.String("sftp.dataCenter", "", "prefer to read and write to volumes in this data center")+ filerSftpOptions.bindIp = cmdFiler.Flag.String("sftp.ip.bind", "", "ip address to bind to. If empty, default to same as -ip.bind option.")filerSftpOptions.localSocket = cmdFiler.Flag.String("sftp.localSocket", "", "default to /tmp/seaweedfs-sftp-<port>.sock")}@@ -256,13 +258,16 @@ func runFiler(cmd *Command, args []string) bool {}if *filerStartSftp {- sftpOptions.filer = &filerAddress+ filerSftpOptions.filer = &filerAddress+ if *filerSftpOptions.bindIp == "" {+ filerSftpOptions.bindIp = f.bindIp+ }if *f.dataCenter != "" && *filerSftpOptions.dataCenter == "" {filerSftpOptions.dataCenter = f.dataCenter}go func(delay time.Duration) {time.Sleep(delay * time.Second)- sftpOptions.startSftpServer()+ filerSftpOptions.startSftpServer()}(startDelay)}