proftpd usage in AWS Ubuntu (LAMPP)

来源:互联网 发布:知乎空气质量检测仪 编辑:程序博客网 时间:2024/06/05 04:11

I started a new AWS ec2 instance, it is "Ubuntu Server 14.04 LTS (HVM), SSD Volume Type", note down a few points here,

1, use the same key pair to access to the AWS EC2 instance, as import the private key file into the putty and WinSCP.
2, stop and start your instance in the AWS console panel, the AWS will assign a new public DNS and IP to your ec2 instance, my new Ubuntu public ip address is 52.77.215.251.
3, Free Tier eligible (t2.micro only)
4, Default ssh Usernames For Connecting To EC2 Instances, refer to this Link, Ubuntu username is 'ubuntu', RHEL username is 'ec2-user'.

Installed the Lampp, last time I was using vsftpd as ftp service, this time in Ubuntu, I use the proftpd which comes with the LAMPP package as ftp service, below is the procedure to setup,

1, check the proftpd is up and running,
ubuntu@ip-172-31-23-55:~$ sudo netstat -ntulp | grep proftpd
tcp6 0 0 :::21 :::* LISTEN 7839/proftpd: (acce
ubuntu@ip-172-31-23-55:~$

2, create user account to access the ftp,
groupadd ftp
usermod -G ftp huilin
mkdir -p /home/huilin
chown root.ftp /home/huilin
chmod 775 /home/huilin

3, proftp configuration, "emacs /opt/lampp/etc/proftpd.conf", add below lines, to make the folder /home/huilin to be accessible by ftp,
<Directory /home/huilin/*>
AllowOverwrite on
</Directory>
4, passive mode error "Status: Server sent passive reply with unroutable address. Using server address instead.", needs to set to support the passive mode, as the ftp is behind the NAT. added below two lines, 52.77.215.251 is the server public address.
PassivePorts 60000 65000
MasqueradeAddress 52.77.215.251 # using an IP address

5, restart the proftpd and test the connection by FileZilla,
sudo /opt/lampp/lampp restart

Reference link:
1, http://www.proftpd.org/docs/howto/NAT.html
2, http://www.osguides.net/operation-systems/73-how-to-set-passive-mode-in-proftpd-on-red-hat-like-distributions.html
3, http://ubuntuforums.org/showthread.php?t=79588
4, https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html
5, https://alestic.com/2014/01/ec2-ssh-username/
6, http://52.77.215.251/dashboard/docs/transfer-files-ftp.html

0 0
原创粉丝点击