0

I am using VirtualBox ubuntu 14.04 on it as a client I have ubuntu commandline version as server as file host. I am able to connect - Authenticate - and upload/download file on/from server using put $FILE orget $FILE but it fails while upload/download process. Following error message shown: for both

ftp: bind: Address already in use

Is there is any way to shift ports of VirtualBox or ftp to verify my test envoirnment?

I have been changed my server port by:

sudo nano /bin/vsftpd.conf
listen_port=2121

How to change client to call on assigned port rather on default?

  • Please explain more fully from where (the VM ? the host ? another computer ?) you're trying to use ftp on which server (the VM ? the host ? another computer ?) – Pyrophorus Sep 30 '14 at 11:20
  • @Pyrophorus see, I update my question to make it clear. – Sarz Sep 30 '14 at 11:27
  • It's strange. It looks like secondary ftp port is already in use. Can you check if some service is using it ? (or vsftpd using an already open port ?) – Pyrophorus Sep 30 '14 at 11:45
  • Question Edited. I have checked from windows Resource Monitor. Port 21 is not been used by any service – Sarz Sep 30 '14 at 11:55
0

Well, it's not really a reply, but comments are too short...

I think I haven't been clear enough speaking about 'secondary port'. Ftp uses two ports:

  1. the command port (or listen port), default 21.
  2. the data port (default 20).

The command port is certainly free, and that's why you could connect and authenticate, and issue get and put commands. But when going to the transfer, another connection is opened on the data port, and this one fails. So, you have to check (and maybe modify) the data port, not the command port.

The problem is even more difficult because ftp has two modes:

  1. The 'passive' mode in which the default ports are used.
  2. The 'active' mode in which ports are negotiated.

This is why I would strongly suggest you to try transfers in passive mode (it's not the default). Any ftp client like Filezilla or the ftp terminal command has this option.

| improve this answer | |
  • thanks for suggestions. now file got download but it doesn't upload on the server. I also change the vsftpd.conf to > write_enable=YES – Sarz Oct 2 '14 at 10:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.