diff --git a/client/incus_instances.go b/client/incus_instances.go index c23453c85ee..a639822e1cc 100644 --- a/client/incus_instances.go +++ b/client/incus_instances.go @@ -1696,7 +1696,7 @@ func (r *ProtocolIncus) GetInstanceFileSFTP(instanceName string) (*sftp.Client, } // Get a SFTP client. - client, err := sftp.NewClientPipe(conn, conn) + client, err := sftp.NewClientPipe(conn, conn, sftp.MaxPacketUnchecked(128*1024)) if err != nil { _ = conn.Close() return nil, err diff --git a/cmd/incusd/main_forkfile.go b/cmd/incusd/main_forkfile.go index 71b8fbe014e..5bf89cfdb92 100644 --- a/cmd/incusd/main_forkfile.go +++ b/cmd/incusd/main_forkfile.go @@ -229,7 +229,7 @@ func (c *cmdForkfile) Run(cmd *cobra.Command, args []string) error { mu.Unlock() // Spawn the server. - server, err := sftp.NewServer(conn) + server, err := sftp.NewServer(conn, sftp.WithAllocator()) if err != nil { return }