fixed some typos and improved a log

This commit is contained in:
Nicola Murino 2020-02-25 12:46:52 +01:00
parent c516780289
commit e69536f540
3 changed files with 3 additions and 3 deletions

View file

@ -408,7 +408,7 @@ To enable dynamic users modifications you must set the absolute path of your pro
The external program can read the following environment variables to get info about the user trying to login:
- `SFTPGO_LOGIND_USER`, it contains the user trying to login serialized as JSON
- `SFTPGO_LOGIND_METHOD`, possibile values are: `password`, `publickey` and `keyboard-interactive`
- `SFTPGO_LOGIND_METHOD`, possible values are: `password`, `publickey` and `keyboard-interactive`
The program must write, on its the standard output, an empty string (or no response at all) if no user update is needed or the updated SFTPGo user serialized as JSON.
The JSON response can include only the fields that need to the updated instead of the full user, for example if you want to disable the user you can return a response like this:

View file

@ -202,7 +202,7 @@ type Config struct {
// The external program can read the following environment variables:
//
// - SFTPGO_LOGIND_USER, it contains the user trying to login serialized as JSON
// - SFTPGO_LOGIND_METHOD, possibile values are: "password", "publickey" and "keyboard-interactive"
// - SFTPGO_LOGIND_METHOD, possible values are: "password", "publickey" and "keyboard-interactive"
//
// The program must respond on the standard output with an empty string if no user
// update is needed or with a valid SFTPGo user serialized as JSON.

View file

@ -643,7 +643,7 @@ func (c *scpCommand) createDir(dirPath string) error {
return nil
}
if err = c.connection.fs.Mkdir(dirPath); err != nil {
c.connection.Log(logger.LevelError, logSenderSCP, "error creating dir %#v", dirPath)
c.connection.Log(logger.LevelError, logSenderSCP, "error creating dir %#v: %v", dirPath, err)
c.sendErrorMessage(err.Error())
return err
}