pureftpd
참고:http://opensourceholic.com/2014/05/11/setup-ftp-account-on-amazon-ec2-using-pure-ftpd/
Install Pure-FTPd:
To install Pure-FTPD on Ubuntu run below command on terminal
sudo apt-get install pure-ftpd
Unlike most FTP servers, Pure-FTPd has almost no configuration files. It is all command-line driven.
Create an unprivileged user and group using the following commands:
sudo groupadd ftpgroup
sudo useradd -g ftpgroup -d /dev/null -s /etc ftpuser
sudo chown -R ftpuser:ftpgroup /home/ftpusers
Next create your ftpuser directory
sudo mkdir /home/ftpusers
This will be the home directory at /home/ftpusers. This will be the root of their access on the server if you create your users with jail access where they can’t move up to higher levels. You can also create a individual home directories for each user using symlink.
The ‘ftpgroup’ group and the ‘ftpuser’ user will be needed when you are setting up users in your ftp server.
Setup FTP user account:
Create a user directory or a home directory for user
$USER
. Replace $USER
with your user name. sudo mkdir /home/ftpusers/$USER
Create user $USER
sudo pure-pw useradd joe -u ftpuser -d /home/ftpusers/$USER
If you wish to create a admin user with full server access omit the
-d /home/ftpusers/$USER
parameter. Create a user database
sudo pure-pw mkdb
Create symbolic links between the respective files. Use following commands to create a symbolic links.
sudo ln -s /etc/pure-ftpd/pureftpd.passwd /etc/pureftpd.passwd
sudo ln -s /etc/pure-ftpd/pureftpd.pdb /etc/pureftpd.pdb
sudo ln -s /etc/pure-ftpd/conf/PureDB /etc/pure-ftpd/auth/PureDB
Configure Pure-FTPd:
root@ec2-user:~# echo no > /etc/pure-ftpd/conf/UnixAuthentication
root@ec2-user:~# echo "yes" > /etc/pure-ftpd/conf/Daemonize
root@ec2-user:~# echo "yes" > /etc/pure-ftpd/conf/NoAnonymous
root@ec2-user:~# echo "yes" > /etc/pure-ftpd/conf/ChrootEveryone
root@ec2-user:~# echo "yes" > /etc/pure-ftpd/conf/IPV4Only
All this configuration is for normal FTP server below are some configuration specific for Amazon EC2 Server
root@ec2-user:~# echo "50000 50100" > /etc/pure-ftpd/conf/PassivePortRange
root@ec2-user:~# echo "public_ip" > /etc/pure-ftpd/conf/ForcePassiveIP
Here put your EC2 server Public IP. Enable port range
50000-50100
and 21
in your amazon security group. sudo /etc/init.d/pure-ftpd restart
And its done try to access your FTP account using your favorite FTP client ex Filezilla, gFTP.
Pure-FTPd commands:
Following are the parameters that you can use with pure-pw command. Look at Pure-FTPd documentation for list of options use pure-pw –help
-d <home directory> : chroot user (recommended)
-D <home directory> : don't chroot user
-z <time> : To allow access only between given time period
-y <max number of concurrent sessions>
-r <allow client ip>/<mask>
-R <deny client ip>/<mask>
-m : also update the /etc/pure-ftpd/pureftpd.pdb database
sudo pure-pw usermod $user $options -m
sudo pure-pw userdel $USER -m
sudo pure-pw list
In case you forget -m option update the User/Password Database manually
sudo pure-pw mkdb
sudo pure-ftpwho
2. ECONNREFUSED - Connection refused by server error
방화벽 닫 기:ufw disable
iptable:iptables-A INPUT-p tcp--dport 21-j ACCEPT 설정
iptables -A INPUT -p tcp --dport 20 -j ACCEPT
iptables -A INPUT -p tcp --dport 50000:50100 -j ACCEPT
연결 이 안 돼.마지막 참조:http://adamschepis.com/blog/2011/02/23/pure-ftpd-passive-ftp-on-amazon-ec2/
제거 하 다 ForcePassiveIP 127.0.0.1 인자 또는 가상 서버 의 네트워크 IP 로 변경
문제 해결
주:클 라 우 드 서버 에 방화벽 이 있 으 면 관련 포트 도 열 어야 합 니 다.
3.사용자 작업 디 렉 터 리 수정
pure-pw usermod riboud -u ftpuser -D /.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
다양한 언어의 JSONJSON은 Javascript 표기법을 사용하여 데이터 구조를 레이아웃하는 데이터 형식입니다. 그러나 Javascript가 코드에서 이러한 구조를 나타낼 수 있는 유일한 언어는 아닙니다. 저는 일반적으로 '객체'{}...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.