搭建FTP服务器

安装vsftpd

sudo apt-get install vsftpd  

配置vsftpd.conf文件

sudo vi /etc/vsftpd.conf

设置以下:

不允许匿名登录

anonymoud_enable=NO

指定ftp上传下载目录

local_root=/hone/xxx

写入权限

write_able=YES

本机登录

local_enable=YES

设置只允许vsftpd.chroot_list文件中的用户进行登录

chroot_list_enable=YES

chroot_list_file=/etc/vsftpd.chroot_list

随后去建立对应的vsftpd.chroot_list文件,添加需要的用户 只需要用户

修改ftp权限:为了不让登录进来的人随意更改目录,更方便去管理

sudo /etc/init.d/vsftpd restart 重启服务。

到此ftp搭建完成

There are two ways of constructing a software design.One is to make it so simple that there are obviously no deficiencies;the other is to make it so complicated that there are no obvious deficiencies.
原文地址:https://www.cnblogs.com/yuanjunqq/p/6212641.html