|
CentOS FTP server set up under a simple record.
1. Install vsftpd
yum install vsftpd
2. Edit iptables
vi / etc / sysconfig / iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 21
service iptables restart
Configuring vsftpd
vi /etc/vsftpd/vsftpd.conf
anonymous_enable = NO // set does not allow anonymous users to access.
4. Add a user ftp
vi /etc/vsftpd/vsftpd.conf
chroot_list_enable = YES
chroot_list_file = / etc / vsftpd / chroot_list
5. Add the ftp user's home directory
useradd -d / var / www / html -g ftp -s / sbin / nologin test
6. Set the user password
passwd test
7. Modify Permissions
chmod 777 / var / www / html -R
chown test: ftp / var / www / html
8. Start vsftpd
service vsftpd restart
OK! Get, the user can log in using the test. |
|
|
|