diff --git a/README.md b/README.md index 96b20f80d3355c72a9a33b7b94922deafbdb524a..86e88815dcd6b628d050f147cc2938a314696a38 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/dataprovider/dataprovider.go b/dataprovider/dataprovider.go index 9ea4835f55badb6599913aa3d57c15018ca1c2a0..e10a52337a9e38504838eafc180283bd6b0580e5 100644 --- a/dataprovider/dataprovider.go +++ b/dataprovider/dataprovider.go @@ -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. diff --git a/sftpd/scp.go b/sftpd/scp.go index ef9b7f34f607ee21e9692bfe33a819ab2d82c6e2..565eb10e674fb224ad830e749119d8f8749c9826 100644 --- a/sftpd/scp.go +++ b/sftpd/scp.go @@ -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 }