1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-28 17:51:24 +00:00
dockerfiles/pure-ftpd/README.md

65 lines
1.4 KiB
Markdown
Raw Normal View History

2015-06-09 15:18:00 +00:00
`Pure-FTPd` is a free (BSD), secure, production-quality and standard-conformant
FTP server. It doesn't provide useless bells and whistles, but focuses on
efficiency and ease of use. It provides simple answers to common needs, plus
unique useful features for personal users as well as hosting providers.
2015-06-09 15:42:50 +00:00
## ~/fig/pureftpd/docker-compose.yml
2015-06-09 15:18:00 +00:00
```
pureftpd:
image: vimagick/pure-ftpd
ports:
- "21:21"
volumes:
- ftpuser:/home/ftpuser
- pure-ftpd:/etc/pure-ftpd
privileged: true
restart: always
```
2015-06-09 15:42:50 +00:00
2015-06-09 17:12:43 +00:00
> We only need to expose port 21 to accept client ftp connection.
> Pure-FTPd will open random port to accept client ftp-data connection.
> At this time, host machine is a router for DNAT.
2015-06-09 15:42:50 +00:00
## server
```
$ cd ~/fig/pureftpd/
$ fig up -d
$ fig ps
$ docker exec -it pureftpd_pureftpd_1 bash
2015-06-09 16:59:28 +00:00
>>> pure-pw useradd kev -u ftpuser -d /home/ftpuser/kev -t 1024 -T 1024 -y 1 -m
2015-06-09 15:42:50 +00:00
>>> pure-pw list
>>> pure-pw show kev
>>> pure-pw passwd kev -m
>>> pure-pw userdel kev -m
2015-06-09 16:59:28 +00:00
>>> pure-ftpwho -n
2015-06-09 17:12:43 +00:00
>>> exit
$ tree -F
.
├── docker-compose.yml
├── ftpuser/
│   └── kev/
│   └── file.txt
└── pure-ftpd/
├── pureftpd.passwd
└── pureftpd.pdb
2015-06-09 15:42:50 +00:00
```
## client
```
$ ftp remote-server
Name: kev
Password: ******
2015-06-09 15:47:42 +00:00
ftp> !touch file.txt
2015-06-09 15:42:50 +00:00
ftp> !ls
ftp> put file.txt
ftp> !rm file.txt
ftp> get file.txt
ftp> del file.txt
ftp> ls
ftp> bye
```