Open LeonT-A opened 4 years ago
Another user was able to show me a work-around for the issue and why it was happening.
For others with this problem, look here for a temporary solution until the problem is resolved...
https://github.com/atmoz/sftp/issues/234#issuecomment-670701339
A couple of problems are happening for you.
volumes:
- ./docker/sftp/users.conf:/etc/sftp/users.conf:ro
was never going to work.
the correct way to do this is to put users.conf in a local directory, e.g. "conf/users.conf" and mount that in your compose file
volumes:
- docker/conf:/etc:ro**
will work, however
docker cant mount single files, only directories, so
Not true. See https://github.com/atmoz/sftp/issues/285#issuecomment-933716962
On Docker Desktop for Windows there may be extra configuration needed, depending on your docker setup. See https://docs.docker.com/desktop/windows/#resources under "File Sharing".
I'm having issues setting up the users.conf file. It seems incredibly straight-forward, but I've been ripping my hair out for a few hours with no luck.
I used this command (from the README) to encrypt my password (dummy password)...
It returned the encrypted password, which I placed into a users.conf file...
And then mounted that file according to the README
When I build my docker-compose file, I am presented with this error and it exits with code 1...
I've also tried shorter passwords, adding uid/gid, and even using plain-text password without encryption in the users.conf file (which builds successfully, but gives me a failed password error whenever I try to connect). Using
command: "superman:$$1$$MS4IkSp5$$BcMB1UWAYdM1O5dX5u7VF.:e"
in my docker-compose works fine, but I cant get the users.conf file to work at all.OS: Windows 10 Image: latest Docker: 2.3.0.3 (45519)
P.S I can't find any documentation on how to use the SFTP_USERS environment variable (specifically with multiple users). I haven't tested it yet.