Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global.Chroot is not respected #152

Open
freddyli opened this issue Aug 9, 2024 · 1 comment
Open

Global.Chroot is not respected #152

freddyli opened this issue Aug 9, 2024 · 1 comment

Comments

@freddyli
Copy link

freddyli commented Aug 9, 2024

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

@freddyli
Copy link
Author

freddyli commented Aug 9, 2024

A workaround is to specify Chroot for each user explicitly.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant