Setting up an SFTP server on Linux
leroykayanda
Posted on January 18, 2024
docker-compose.yaml
version: '3'
services:
sftp:
image: atmoz/sftp
volumes:
- ./users.conf:/etc/sftp/users.conf:ro
- ./sftp/uploads/harry:/home/harry
- ./sftp/uploads/john:/home/john
ports:
- "2222:22"
users.conf
harry:secret:::uploads
john:pass:::uploads
An uploads folder will be created in each user directory e.g /home/harry/uploads. Uploads need to be done in this directory as the /home/harry directory is owned by root and the user will not have permissions to upload items there.
References
https://hub.docker.com/r/atmoz/sftp
https://github.com/atmoz/sftp/issues/16
💖 💪 🙅 🚩
leroykayanda
Posted on January 18, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.