add version to the default server banner
This commit is contained in:
parent
3d13fe15c3
commit
6b33d3d9f1
3 changed files with 6 additions and 5 deletions
|
@ -117,7 +117,7 @@ The `sftpgo` configuration file contains the following sections:
|
|||
- `idle_timeout`, integer. Time in minutes after which an idle client will be disconnected. 0 menas disabled. Default: 15
|
||||
- `max_auth_tries` integer. Maximum number of authentication attempts permitted per connection. If set to a negative number, the number of attempts are unlimited. If set to zero, the number of attempts are limited to 6.
|
||||
- `umask`, string. Umask for the new files and directories. This setting has no effect on Windows. Default: "0022"
|
||||
- `banner`, string. Identification string used by the server. Default "SFTPGo"
|
||||
- `banner`, string. Identification string used by the server. Leave empty to use the default banner. Default "SFTPGo_version"
|
||||
- `upload_mode` integer. 0 means standard, the files are uploaded directly to the requested path. 1 means atomic: files are uploaded to a temporary path and renamed to the requested path when the client ends the upload. Atomic mode avoids problems such as a web server that serves partial files when the files are being uploaded. In atomic mode if there is an upload error the temporary file is deleted and so the requested upload path will not contain a partial file.
|
||||
- `actions`, struct. It contains the command to execute and/or the HTTP URL to notify and the trigger conditions
|
||||
- `execute_on`, list of strings. Valid values are `download`, `upload`, `delete`, `rename`. On folder deletion a `delete` notification will be sent for each deleted file. Actions will be not executed if an error is detected and so a partial file is uploaded or downloaded. Leave empty to disable actions.
|
||||
|
|
|
@ -13,12 +13,12 @@ import (
|
|||
"github.com/drakkan/sftpgo/dataprovider"
|
||||
"github.com/drakkan/sftpgo/logger"
|
||||
"github.com/drakkan/sftpgo/sftpd"
|
||||
"github.com/drakkan/sftpgo/utils"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
const (
|
||||
logSender = "config"
|
||||
defaultBanner = "SFTPGo"
|
||||
// DefaultConfigName defines the name for the default config file.
|
||||
// This is the file name without extension, we use viper and so we
|
||||
// support all the config files format supported by viper
|
||||
|
@ -29,6 +29,7 @@ const (
|
|||
|
||||
var (
|
||||
globalConf globalConfig
|
||||
defaultBanner = fmt.Sprintf("SFTPGo_%v", utils.GetAppVersion().Version)
|
||||
)
|
||||
|
||||
type globalConfig struct {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"idle_timeout": 15,
|
||||
"max_auth_tries": 0,
|
||||
"umask": "0022",
|
||||
"banner": "SFTPGo",
|
||||
"banner": "",
|
||||
"upload_mode": 0,
|
||||
"actions": {
|
||||
"execute_on": [],
|
||||
|
|
Loading…
Reference in a new issue