diff --git a/internal/sftpd/server.go b/internal/sftpd/server.go index 3b694e40..fdad2d0f 100644 --- a/internal/sftpd/server.go +++ b/internal/sftpd/server.go @@ -693,7 +693,7 @@ func (c *Configuration) handleSftpConnection(channel ssh.Channel, connection *Co defer common.Connections.Remove(connection.GetID()) // Create the server instance for the channel using the handler we created above. - server := sftp.NewRequestServer(channel, c.createHandlers(connection), sftp.WithRSAllocator(), + server := sftp.NewRequestServer(channel, c.createHandlers(connection), sftp.WithStartDirectory(connection.User.Filters.StartDirectory)) defer server.Close() diff --git a/internal/sftpd/subsystem.go b/internal/sftpd/subsystem.go index cda0ecdc..b17bd62e 100644 --- a/internal/sftpd/subsystem.go +++ b/internal/sftpd/subsystem.go @@ -80,7 +80,7 @@ func ServeSubSystemConnection(user *dataprovider.User, connectionID string, read FilePut: connection, FileCmd: connection, FileList: connection, - }, sftp.WithRSAllocator()) + }) defer server.Close() return server.Serve()