CentOS下搭建FTP服务器简单记录。

1.安装vsftpd 
yum install vsftpd

centos 安装ftp服务器

2.编辑iptables
vi /etc/sysconfig/iptables 
-A INPUT -m state --state NEW -m tcp -p tcp --dport 21 
service iptables restart

3.配置vsftpd
vi /etc/vsftpd/vsftpd.conf  
anonymous_enable=NO  //设定不允许匿名用户访问。

4.添加ftp用户
vi /etc/vsftpd/vsftpd.conf 
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list

5.添加ftp用户home目录
useradd -d /var/www/html -g ftp -s /sbin/nologin test

6.设置用户密码
passwd test

7.修改权限
chmod 777 /var/www/html -R
chown test:ftp /var/www/html

8.启动vsftpd
service vsftpd restart

相关文章:

  • 2022-02-06
  • 2021-07-10
  • 2021-11-22
  • 2021-04-08
  • 2021-09-18
  • 2021-08-07
  • 2021-05-17
  • 2022-12-23
猜你喜欢
  • 2022-01-10
  • 2022-12-23
  • 2021-12-14
  • 2021-12-07
  • 2021-10-27
  • 2021-08-31
  • 2021-09-29
相关资源
相似解决方案