1、系统环境

[root@jie ~]# cat /etc/redhat-release
CentOS release 6.8 (Final)
[root@jie ~]#
[root@jie ~]# /etc/init.d/iptables status
iptables: Firewall is not running.
[root@jie ~]# getenforce
Disabled
[root@jie ~]#
2、检查是否已经安装了vsftpd

[root@jie ~]# rpm -qa|grep vsftpd
[root@jie ~]#
3、安装vsftpd

[root@jie ~]# yum install -y vsftpd
4、配置vsftpd服务

[root@jie ~]# cd /etc/vsftpd/
[root@jie vsftpd]# ll
total 20
-rw------- 1 root root 125 Mar 22 20:14 ftpusers
-rw------- 1 root root 361 Mar 22 20:14 user_list
-rw------- 1 root root 4599 Mar 22 20:14 vsftpd.conf
-rwxr--r-- 1 root root 338 Mar 22 20:14 vsftpd_conf_migrate.sh
[root@jie vsftpd]# cp vsftpd.conf{,.bak}
[root@jie vsftpd]# ll
total 28
-rw------- 1 root root 125 Mar 22 20:14 ftpusers
-rw------- 1 root root 361 Mar 22 20:14 user_list
-rw------- 1 root root 4599 Mar 22 20:14 vsftpd.conf
-rw------- 1 root root 4599 Sep 5 17:15 vsftpd.conf.bak
-rwxr--r-- 1 root root 338 Mar 22 20:14 vsftpd_conf_migrate.sh
[root@jie vsftpd]# [root@jie vsftpd]# cat vsftpd.conf
# Example config file /etc/vsftpd/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=NO
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# The target log file can be vsftpd_log_file or xferlog_file.
# This depends on setting xferlog_std_format parameter
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# The name of log file when xferlog_enable=YES and xferlog_std_format=YES
# WARNING - changing this filename affects /etc/logrotate.d/vsftpd.log
#xferlog_file=/var/log/xferlog
#
# Switches between logging into vsftpd_log_file and xferlog_file files.
# NO writes to vsftpd_log_file, YES to xferlog_file
xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ASCII mangling is a horrible feature of the protocol.
ascii_upload_enable=YES
ascii_download_enable=YES
#
# You may fully customise the login banner string:
ftpd_banner=Welcome to blah FTP service.
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd/banned_emails
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
chroot_local_user=YES
chroot_list_enable=YES
# (default follows)
chroot_list_file=/etc/vsftpd/chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES
#
# When "listen" directive is enabled, vsftpd runs in standalone mode and
# listens on IPv4 sockets. This directive cannot be used in conjunction
# with the listen_ipv6 directive.
listen=YES
#
# This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6
# sockets, you must run two copies of vsftpd with two configuration files.
# Make sure, that one of the listen options is commented !!
#listen_ipv6=YES pam_service_name=vsftpd
userlist_enable=NO
tcp_wrappers=YES
userlist_file=/etc/vsftpd/user_list
5、添加用户

[root@jie vsftpd]# groupadd public
[root@jie vsftpd]# useradd -g public -d /public -s /sbin/nologin public
[root@jie vsftpd]# id public
uid=500(public) gid=500(public) groups=500(public)
[root@jie vsftpd]#
[root@jie vsftpd]# echo "123456"|passwd --stdin public
Changing password for user public.
passwd: all authentication tokens updated successfully.
[root@jie vsftpd]#
6、设定权限

[root@jie vsftpd]# chown -R public.public /public
[root@jie vsftpd]# cat chroot_list
public
[root@jie vsftpd]#
7、启动服务

[root@jie vsftpd]# chkconfig vsftpd on
[root@jie vsftpd]# /etc/init.d/vsftpd start
Starting vsftpd for vsftpd: [ OK ]
[root@jie vsftpd]#
8、测试使用
在windows上利用FTP工具即可连接到FTP服务器。至此,vsftpd安装配置完成,其他的需求可以根据不同的要求自行设定。
 

阿里云vsftp安装和简单的配置的更多相关文章

  1. 阿里云centos安装svn和submin

    概述 没有找到可以让团队方便使用的云盘,暂时搭建一个svn凑合用一下 svn有三种安装方式 安装方式 服务程序 服务协议 用户和密码 授权 系统配置 svn独立安装 svnserve svn pass ...

  2. 阿里云ECS服务器Linux环境下配置php服务器(二)--phpMyAdmin篇

    上一篇讲了PHP服务器的基本配置,我们安装了apache,php,还有MySQL,最后还跑通了一个非常简单的php页面,有兴趣的朋友可以看我的这篇博客: 阿里云ECS服务器Linux环境下配置php服 ...

  3. [docker]通过阿里云源安装docker && flannel不通问题解决(try this guy out)

    docker清理容器 # 容器停止后就自动删除: docker run --rm centos /bin/echo "One"; # 杀死所有正在运行的容器: docker kil ...

  4. 阿里云ECS安装flannel启动问题

    在阿里云ECS安装flannel,安装过程可以在网上找文章,这样的文章很多.我这里讲一下启动flannel遇到的两个问题的解决方法. 1,network.go:102] failed to retri ...

  5. 在阿里云上安装python3.4和pycharm

    一. 安装python3.4 二. 安装pycharm 三. 安装可视化界面和远程桌面连接 四. 启动和配置pycharm 五. 安装更多字体 六. 给pycharm设置桌面快捷方式 一. 安装pyt ...

  6. 阿里云linux安装jmeter并进行压测

    一.阿里云linux安装JDK 1.下载安装JDK jdk官网,选择linux版本,下载并保存. (一)yum安装 安装epel的yumyuan yum install epel-release -y ...

  7. 阿里云部署安装redis无法访问

    ps:我在linux上安装redis后发现一直端口不通连接不上,折腾一晚上.后来在阿里云官方回复(机器人)中看到下面的回复:       2019/02/28 22:50 自己一试,过完是端口监听是本 ...

  8. 阿里云Ubuntu安装Composer和中国镜像

    引用: Composer是PHP用来管理依赖(dependency)关系的工具.你可以在自己的项目中声明所依赖的外部工具库(libraries),Composer 会帮你安装这些依赖的库文件. PHP ...

  9. 阿里云centos安装oracle

    目录 阿里云centos安装oracle 阿里云默认没有swap分区,oracle安装需要 安装Oracle所需的依赖包 创建用户和组 关闭SELINUX(阿里云缺省关闭) 开始安装 使用" ...

随机推荐

  1. 转 :关于springmvc使用拦截器

    原博客: http://elim.iteye.com/blog/1750680 SpringMVC 中的Interceptor 拦截器也是相当重要和相当有用的,它的主要作用是拦截用户的请求并进行相应的 ...

  2. 根据需要通过代码的方式加载js文件

    var head = document.getElementsByTagName('head')[0]; var script = document.createElement('script'); ...

  3. Tkinter Frame(框架)

       Tkinter Frame(框架): 框架构件在某种友好的方式进行分组和组织的其他部件的过程中是非常重要的.它就像一个容器,这是负责安排其他部件的位置   框架构件在某种友好的方式进行分组和组织 ...

  4. apt-get使用国内镜像源

    apt-get 1.复制原文件备份(万一弄坏源文件可恢复) sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak 2.编辑源列表文件 sudo ...

  5. 说说JDK中的String.valueOf()传null的诡异处理

    都说JDK的实现诡异多,今儿也算是被我踩到一个坑了. 就来说说关于String.valueOf的这个坑. public class TestString { public static void ma ...

  6. java获取取前段页面的参数

    request.getParameter("tnumber") document.forms[0].s_id.value;

  7. FP寻源报错

    ERROR [HY000] [Oracle][ODBC][Ora]ORA-01114: IO error writing block to file  (block # )  ORA-01114: I ...

  8. spring bean单例注入与用单例模式通过class.getinstance()区别?

    1.action的某个方法中,用以下代码获得redis单例实例 RedisDelegate redisDelegate = RedisDelegate.getInstance(); redisDele ...

  9. Java方法重写与super关键字

    ----------siwuxie095                     方法的重写:     (1)在继承中也存在着重写的概念,其实就是子类定义了和父类同名的方法     (2)定义:方法名 ...

  10. 微信OAuth2.0网页授权php示例

    1.配置授权回调页面域名,如 www.aaa.com 2.模拟公众号的第三方网页,fn_system.php <?php if(empty($_SESSION['user'])){ header ...