linux ftp 简单搭建

1、安装

yum install vsftpd

2、重启服务

/sbin/service vsftpd restart
Shutting down vsftpd: [ OK ]
Starting vsftpd for vsftpd: [ OK ]
OK表示重启成功了.

3、去掉匿名登录

cp /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf.bak

修改文件:

vim /etc/vsftpd/vsftpd.conf

#anonymous_enable=YES
anonymous_enable=NO

4、创建用户

/usr/sbin/adduser -d /opt/test_ftp -g ftp -s /sbin/nologin test

创建test用户 目录是/opt/test_ftp 用户组是ftp 不允许ssh登录

5、把某个文件夹权限分配给ftp用户

chown test:ftp testdir

如可以将web服务器下面某个文件夹geitest读写权限方便测试

 

参考:

 

http://blog.csdn.net/kofterry/article/details/4277267

http://blog.sina.com.cn/s/blog_6017fba00100gj6v.html

posted @ 2018-03-16 15:00  愤怒的企鹅  阅读(130)  评论(0编辑  收藏  举报