fauria / docker-vsftpd

🐳 vsftpd Docker image based on Centos 7. Supports passive mode and virtual users.
https://hub.docker.com/r/fauria/vsftpd/
Apache License 2.0
414 stars 341 forks source link

How to properly mount and structure the Volume #54

Open CpBobette opened 4 years ago

CpBobette commented 4 years ago

Hi,

I feel like I am missing something obvious, I created the directory and changed the ownership to user 14 and group 50 but I keep getting errors when listing the directory.

salprima commented 4 years ago

I also getting the same issue as @CpBobette below is my docker-compose file for the reference

version: '3.7'
services:
  ftpd_docker:
    image: fauria/vsftpd
    container_name: ftpd_docker
    environment:
      FTP_USER: foo
      FTP_PASS: bar
      PASV_ADDRESS_ENABLE: "YES"
      PASV_ADDRESS: 127.0.0.1
    ports:
      - 0.0.0.0:20:20
      - 0.0.0.0:21:21
      - 21100-21110:21100-21110
    volumes:
      - ./data/vsftpd:/home/vsftpd
      - ./data/log:/var/log/vsftpd

log message from the FileZilla

Status:         Connecting to 127.0.0.1:21...
Status:         Connection established, waiting for welcome message...
Status:         Insecure server, it does not support FTP over TLS.
Status:         Logged in
Status:         Retrieving directory listing...
Command:    PWD
Response:   257 "/"
Command:    TYPE I
Response:   200 Switching to Binary mode.
Command:    PASV
Response:   227 Entering Passive Mode (172,28,0,1,82,111).
Command:    LIST
Error:          Connection timed out after 20 seconds of inactivity
Error:          Failed to retrieve directory listing

I've tried to disable the timeout but no luck. The home directory is created under ./data/vsftpd/foo but the directory listing still failed at some point. I'm running on

MacOS Catalina 10.15.6
Docker 19.03.12
Compose 1.26.2

any clue will be appreciated.

UPDATES THE SOLUTION adding this environment to make it works. Sorry for not reading the documentation properly.

      LOCAL_UMASK: 0777