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. 表格字段常用注解@NotBlank @NotEmpty @NotNul @Pattern

    在Hibernate Validator(org.hibernate.validator.constraints)中: @NotEmpty://CharSequence, Collection, Ma ...

  2. KEGG Pathway Anonatation

    转载于 Original 2017-06-20 liuhui 生信百科 KEGG 数据库中,把功能相似的蛋白质归为同一组,然后标上 KO 号.通过相似性比对,可以为未知功能的蛋白序列注释上 KO 号. ...

  3. nginx 1.12 配置解析php

    server { listen 80; server_name foo.com; root /path; index index.html index.htm index.php; location ...

  4. Apache加载curl_init 失败 php_curl.dll

    Call to undefined function curl_init php.ini curl_init extension=php_curl.dll xampp\php\php.ini 2018 ...

  5. SpringMVC前后台数据传递中Json格式的相互转换(前台显示格式、Json-lib日期处理)及Spring中的WebDataBinder浅析

    两个方向: 一.前台至后台: Spring可以自动封装Bean,也就是说可以前台通过SpringMVC传递过来的属性值会自动对应到对象中的属性并封装成javaBean,但是只能是基本数据类型(int, ...

  6. 使用JavaScript弹出Confirm对话框

    方法1: 这个比较简单,一句话: <a href="error.htm" onclick="javascript:return confirm('are you s ...

  7. Sqoop 1.99.6 安装和使用

        安装   1.安装准备工作:   下载的sqoop安装包 http://mirrors.hust.edu.cn/apache/sqoop/1.99.6/sqoop-1.99.6.tar.gz ...

  8. keepalived之vrrp_script详解

    通常情况下,利用keepalived做热备,其中一台设置为master,一台设置为backup.当master出现异常后,backup自动切换为master.当backup成为master后,mast ...

  9. Mac 通过gem安装CocoaPods及Pod的使用

    注:根据http://www.jianshu.com/p/6e5c0f78200a的文章做了部分修改 一.什么是CocoaPods CocoaPods是iOS项目的依赖管理工具,该项目源码在Githu ...

  10. hdu3999-The order of a Tree (二叉树的先序遍历)

    http://acm.hdu.edu.cn/showproblem.php?pid=3999 The order of a Tree Time Limit: 2000/1000 MS (Java/Ot ...