这是本文档旧的修订版!


开启 ftp 服务

安装 FTP

sudo apt-get install vsftpd

配置:vim /etc/vsftpd.conf

充许匿名访问


anonymous_enable=YES
anon_root=/home/aborn/ftp
anon_max_rate=2048000

卸载 apt-get remove vsftpd –purge

设置该目录有可访问权限

sudo usermod -d /home/aborn/ftp ftp

  • 查看FTP服务是否运行中:service vsftpd status
  • 查看本地是否含有包含ftp的进程开启:ps -ef | grep ftp
  • FTP设置开机自动运行:chkconfig vsftpd on
  • 关闭FTP开机自动运行:chkconfig vsftpd off
  • 查看所有服务开启自动运行的情况:chkconfig –list
  • 启动FTP服务:service vsftpd start
  • 停止FTP服务:service vsftpd stop
  • 重启FTP服务:service vsftpd restart

systemctl start vsftpd.service #启动
systemctl enable vsftpd.service #开机自启

创建授权用户

2)创建用户 useradd ftpUser -m

为该用户添加密码

passwd ftpUser 回车

输入密码: <font inherit/inherit;;inherit;;rgb(251, 250, 249)>*</font>

并添加到 vsftpd.userlist 文件当中 echo “ftpUser” | sudo tee -a /etc/vsftpd.chroot_list

3)修改配置文件vim /etc/vsftpd.conf

修改或添加如下行:

4)重启vsftp service vsftpd restart

5) 终端远程登录写用户和密码就好,用ForkLift登录端口为21

具体设置参考以下 gist.github

it/server/ftp.1626795580.txt.gz · 最后更改: 2021-07-20 15:39 由 goldentianya
回到顶部
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0