Skip to content

Global.Chroot is not respected #152

@freddyli

Description

@freddyli

I would like to change the default Global.Chroot to something else, like: %h/sftp. No other Chroot configuration in Users. Still, the users get configured with the default Chroot of %h.

I think I have some hints to the root cause below.

My config is:

{
    "Global": {
        "Chroot": {
            "Directory": "%h/sftp"
        }
    },
    "Users": [
        {
            "Username": "demo",
            "Password": "demo",
        }
    ]
}

I wse docker compose:

  sftp:
    image: "emberstack/sftp:5.1.71"
    ports:
      - "22:22"
    volumes:
      - ./secrets/sftp.json:/app/config/sftp.json:ro
      - ./volumes/demo/something/:/home/demo/sftp/something/

Maybe I am overlooking something and barking up the wrong tree. But after a quick look through the code, here are my thoughts in screenshots:

240809-145311
240809-145331
240809-145249
240809-145410
240809-145458

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions