Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

227 Entering Passive Mode (0,0,0,0,156,64). #88

Open
AnhDai1997 opened this issue Apr 12, 2024 · 2 comments
Open

227 Entering Passive Mode (0,0,0,0,156,64). #88

AnhDai1997 opened this issue Apr 12, 2024 · 2 comments

Comments

@AnhDai1997
Copy link

i create ftp server with this docker compose:
services:
ftp-server:
container_name: ftp-server
environment:
- FTP_PASS=<my - pass>
- FTP_USER=anhdai
image: garethflowers/ftp-server
ports:
- '20-21:20-21/tcp'
- '40000-40009:40000-40009/tcp'
volumes:
- './data:/home/anhdai'

but get error when try login from windows
Screenshot 2024-04-12 154656

this ftp server log:
Screenshot 2024-04-12 154439

how to fix this?

@galiullinis
Copy link

Hi!
Mount your own vsftpd.conf file:

volumes:
 - './data:/home/anhdai'
 - './vsftpd.conf:/etc/vsftpd.conf'

where you can change the next few params:

pasv_address=<your-external-IP-address-here-not-0.0.0.0>
pasv_addr_resolve=NO

cause your FTP server tells to your PC FTP client to connect to 0.0.0.0 so why you need to specify correct external IP address

@poliyka
Copy link

poliyka commented Jun 22, 2024

Hi! Mount your own vsftpd.conf file:

volumes:
 - './data:/home/anhdai'
 - './vsftpd.conf:/etc/vsftpd.conf'

where you can change the next few params:

pasv_address=<your-external-IP-address-here-not-0.0.0.0>
pasv_addr_resolve=NO

cause your FTP server tells to your PC FTP client to connect to 0.0.0.0 so why you need to specify correct external IP address

I tried it, but it gets stuck in the 'compose up' process and returns exit code 2.
Therefore, I customized a Dockerfile to copy it into the container again
like this:

# docker-compose.yaml
services:
  ftp-server:
    build:
      context: .
      dockerfile: Dockerfile
    environment:
      - FTP_PASS=pass
      - FTP_USER=user
    ports:
      - '20-21:20-21/tcp'
      - '40000-40009:40000-40009/tcp' # Only needed for passive mode
    volumes:
      - './data:/home/user'
    network_mode: "bridge"
# Dockerfile
FROM garethflowers/ftp-server

COPY [ "./vsftpd.conf", "/etc" ]

And it work!

I also recommend that these two environments be set up in a Compose environment for better management.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants