Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

SFTP sessions start in/tmp/coder.KnYnxH (instead of$HOME) #3620

Closed
Labels
apiArea: HTTP API
@mafredri

Description

@mafredri

Since we are starting the coder agent in the tmpdir, SFTP sessions also start in that folder.

Arguably, the session should start in$HOME because this is my experience with OpenSSH and it's more useful when doingsftp followed byls (list files) or doing something with home-relative paths.

sftp coder.work.mainConnected to coder.work.main.sftp> pwdRemote working directory: /tmp/coder.KnYnxH

There are (potentially) two ways to fix this:

  1. Runos.Chdir in an early part ofcoder agent startup to change the default working directory by anything started by the agent
  2. Switch outsftp.Server forsftp.RequestServer (e.g.sftp.NewRequestServer(session, sftp.InMemHandler(), sftp.WithStartDirectory(os.Getenv("HOME"))))

Re: 2, I don't know ifsftp.RequestServer can work as a drop-in replacement, the documentation is quite vague.

Definition of done

  • The user lands in$HOME when usingsftp

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiArea: HTTP API

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp