emberstack / docker-sftp

SFTP Server for Docker
MIT License
196 stars 51 forks source link

How can I set the home directory to be /home/%h #150

Open aratar79 opened 4 months ago

aratar79 commented 4 months ago

I have tried in several ways to set the home directory as the start path of each user and the cases are, either it has no write permissions, which I can correct, but every time it is logged in it is rewritten or it does not log in at all.


    "Global": {
        "Chroot": {
            "Directory": "%h",
            "StartPath": ""
        },
        "Directories": []
    },
    "Users": [
        {
            "Username": "Agent-11023",
            "Password": "Password",
            "UID": 1001,
            "GID": 1001,
            "Directories": [
                {
                    "Path": "/home/Agent-11023",
                    "WritePermission": true
                }
            ]
        },
        {
            "Username": "Agent-11972",
            "Password": "Password",
            "UID": 1002,
            "GID": 1002,
            "Directories": [
                {
                    "Path": "/home/Agent-11972",
                    "WritePermission": true
                }
            ]
        },
        {
            "Username": "Agent-33649",
            "Password": "Password",
            "UID": 1003,
            "GID": 1003,
            "Directories": [
                {
                    "Path": "/home/Agent-33649",
                    "WritePermission": true
                }
            ]
        }
    ]
}```
How can I make it work? Any help?