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. 灾难恢复:RPO与RTO

    许多企事业单位虽然已经认识到信息安全的重要性,却迟迟没有行动.其中的原因是多方面的,最主要的一个原因就是在如何建立容灾系统的问题上存在种种疑惑.容灾设计指标主要与容灾系统的数据恢复能力有关,最常见的设 ...

  2. mongoDB数据库的修复

    mongoDB数据库的修复 标签: 数据库mongodbdatabasefile文档 2011-08-05 11:33 2323人阅读 评论(0) 收藏 举报  分类: 数据库技术/Cache技术/存 ...

  3. Mysql进行复杂查询

    1.查询“生物”课程比“物理”课程成绩高的所有学生的学号: 思路: (1)获取所有选了 生物 课程的学生的成绩(学号,成绩) --临时表     (2)获取所有选了 物理 课程的学生的成绩(学号,成绩 ...

  4. 【Oracle】Oracle 10g利用闪回挽救误删的数据

    我们在开发和运维过程中,经常遇到数据被误删除的情况.无论是在应用开发中的Bug,还是修改数据的时候,如果提交了错误数据修改结果,会带来很多问题.一般来说,一旦提交commit事务,我们是不能获取到之前 ...

  5. PHP函数内访问全局变量

    $dbcon='123'; 方法一.funtion fun1(){global $dbcon;$dbcon-> 就可以访问了.} 方法二$GLOBALS['$dbcon'];

  6. MPEG-2码流结构分析

    MPEG2视频编码定义在 ISO/IEC13818-2中,MPEG2 video sequence如下图所示 我们可以借助Elecard Stream Analyer工具来分析MPEG2视频码流 MP ...

  7. MyBatis 学习记录7 一个Bug引发的思考

    主题 这次学习MyBatis的主题我想记录一个使用起来可能会遇到,但是没有经验的话很不好解决的BUG,在特定情况下很容易发生. 异常 java.lang.IllegalArgumentExceptio ...

  8. U3D 代码自动化生成定制预置体的旋转问题

    //定制预置体 //要求:1,模型面向U3D的Z轴正向(由MAX导出时是面向U3D的X负向的) //2,增加一些常用挂点,3增加一个圆形阴影片,4,添加包围盒 //根据这些要求制作预置休 static ...

  9. Linux实战教学笔记30:Nginx反向代理与负载均衡应用实践

    1.1 集群简介 简单地说,集群就是指一组(若干个)相互独立的计算机,利用高速通信网络组成的一个较大的计算机服务系统,每个集群节点(即集群中的每台计算机)都是运行各自服务的独立服务器.这些服务器之间可 ...

  10. Apache Hive (三)Hive元数据信息对应MySQL数据库表

    转自:https://www.cnblogs.com/qingyunzong/p/8710356.html 概述 Hive 的元数据信息通常存储在关系型数据库中,常用MySQL数据库作为元数据库管理. ...