How To Mount A Ftp Server In A Ec2 Amazon Instance To Host A Uscs Hub?
1
0
Entering edit mode
10.7 years ago
Geparada ★ 1.5k

I currently have my UCSC hub over a ftp sever of my workstation, but now I want to host this hub on a EC2 server. The problem is that I can't allow the anonymous access to the EC2 ftp server.

Here is my current vsftpd.conf:

listen=YES
local_enable=NO
anonymous_enable=YES
write_enable=NO
anon_root=/var/ftp

pasv_min_port=14000   #Allowed on my security group
pasv_max_port=14050

pasv_enable=YES
port_enable=YES

download_enable=YES
pasv_address=$MY.ELASTIC.IP

listen_port=21
no_anon_password=YES

My current iptables state is:

$iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere             state NEW,RELATED,ESTABLISHED

When I try to access through FileZilla, this error appears:

Status:    Connecting to $MY.ELASTIC.IP...
Status:    Connection established, waiting for welcome message...
Response:    220 (vsFTPd 3.0.2)
Command:    USER anonymous
Response:    230 Login successful.
Command:    OPTS UTF8 ON
Response:    200 Always in UTF8 mode.
Status:    Connected
Status:    Retrieving directory listing...
Command:    PWD
Response:    257 "/"
Command:    TYPE I
Response:    200 Switching to Binary mode.
Command:    PASV
Error:    Connection closed by server
Error:    Failed to retrieve directory listing

I don't have too much experience with ftp servers and I don't even know if allowing anonymous access to the ftp is necessary make my hub readable by the UCSC server. So anything you know about this may be useful to me.

Thanks for your time!

ucsc • 3.6k views
ADD COMMENT
0
Entering edit mode

why not just host it under a public webserver, that would be a lot less hassle

ADD REPLY
0
Entering edit mode

Do you think that mout a publicweb server in a EC2 is easier than mout a public FTP?

ADD REPLY
1
Entering edit mode

of course, for HTTP you just need to start a webserver and point it at a directory

FTP is a very tricky protocol, it has multiple modes: such as active and passive and the server and client needs to negotiate a new port at which they reconnect. Many things can go wrong with that.

ADD REPLY
0
Entering edit mode

Since a week that I can't solve this ftp problem, so I think I will take your advice... thanks!

ADD REPLY
0
Entering edit mode

You were right. I'm currently have a webserver hosting my hub, and was very easy to mount. The UCSC's engineers also told me that probably perform even better since http only has to open 1 tcp connection instead of 2 (ftp).

ADD REPLY
1
Entering edit mode
10.7 years ago

Summarizing the discussion in the comments.

Host your UCSC hub off of a web server instead.

FTP is a more complex protocol that needs more attention and you have to get more subtle details right.

ADD COMMENT

Login before adding your answer.

Traffic: 2673 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6