配置ftp服务器亲测可用
环境ubuntu16.04
安装vsftpd软件
sudo apt-get install vsftpd
配置vsftpd.conf文件
进入etc目录并备份配置文件
cd /etc/
cp vsftpd.conf ~/vsftpd.conf.bak
进入编辑
sudo vi vsftpd.conf
确保
Listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES前面的#号
使用ipv4的直接注释掉 listen_ipv6=YES
或者直接复制如下文件,替换自己的vsftpd.conf文件
# Example config file /etc/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.
#
#
# Run standalone? vsftpd can run either from an inetd or as a standalone
# daemon started from an initscript.
#
# //listen=NO
listen=YES
#
# This directive enables listening on IPv6 sockets. By default, listening
# on the IPv6 "any" address (::) will accept connections from both IPv6
# and IPv4 clients. It is not necessary to listen on *both* IPv4 and IPv6
# sockets. If you want that (perhaps because you want to listen on specific
# addresses) then you must run two copies of vsftpd with two configuration
# files.
#//listen_ipv6=YES
#listen_ipv6=YES
#
# Allow anonymous FTP? (Disabled by default).
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
#
# If enabled, vsftpd will display directory listings with the time
# in your local time zone. The default is to display GMT. The
# times returned by the MDTM FTP command are also affected by this
# option.
use_localtime=YES
#
# Activate logging of uploads/downloads.
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
#
# You may override where the log file goes if you like. The default is shown
# below.
#xferlog_file=/var/log/vsftpd.log
#
# If you want, you can have your log file in standard ftpd xferlog format.
# Note that the default log file location is /var/log/xferlog in this case.
#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 restrict local users to their home directories. See the FAQ for
# the possible risks in this before using chroot_local_user or
# chroot_list_enable below.
#chroot_local_user=YES
#
# 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().
# (Warning! chroot'ing can be very dangerous. If using chroot, make sure that
# the user does not have write access to the top level directory within the
# 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
#
# Customization
#
# Some of vsftpd's settings don't fit the filesystem layout by
# default.
#
# This option should be the name of a directory which is empty. Also, the
# directory should not be writable by the ftp user. This directory is used
# as a secure chroot() jail at times vsftpd does not require filesystem
# access.
secure_chroot_dir=/var/run/vsftpd/empty
#
# This string is the name of the PAM service vsftpd will use.
pam_service_name=vsftpd
#
# This option specifies the location of the RSA certificate to use for SSL
# encrypted connections.
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
ssl_enable=NO#
# Uncomment this to indicate that vsftpd use a utf8 filesystem.
#utf8_filesystem=YES
pasv_min_port=10060
pasv_max_port=10090#
#
#
在文末加上,将为vsftpd被动模式的端口设置范围
pasv_min_port=10060
pasv_max_port=10090
保存退出
添加FTP用户
sudo useradd -d /home/ubuntu/ftp -s /bin/bash username
执行如下语句设置密码(username为用户名)
sudo passwd username
启动ftp服务
sudo service vsftpd start
配置ftp服务器亲测可用相关推荐
- 苹果ios 11系统无法连接服务器,ios11 App Store无法连接解决办法,亲测可用
原标题:ios11 App Store无法连接解决办法,亲测可用 之前咱们公众号:果粉之家曾多次介绍过IOS11的新功能,包括:加入蜂窝数据开关,可自定义控制中心,支持屏幕录像,支持GIF动图,可以设 ...
- 服务器进tp5项目报nginx404错误,TP5框架在nginx环境下路由报404错误解决方法 亲测可用...
前段时间给客户写了个TP5框架的后台,主要是API调用,上传到客户服务器后发现首页可用,但所有内页报404错误,网上一搜发现天多一样的问题,但找了很多都是不可用的,而且都是过时的,但最终还是自己试出来 ...
- VScode配置C语言环境 亲测 可用!!!
VScode配置C语言环境 亲测 可用!!! 一.首先下载vscode,地址:https://code.visualstudio.com/ 此时我已经安装好了 二.对VSCode进行汉化安装插件Chi ...
- 2019.12QQ音乐播放接口最新配置(亲测可用)
2019.12QQ音乐播放接口最新配置(亲测可用) config下的index.js 代理proxyTable配置: '/api': {target: 'https://c.y.qq.com', // ...
- PHP服务器在线测速系统源码+亲测可用
正文: PHP服务器在线测速系统源码+亲测可用,已经可以近乎准确地测试本地到服务端的上下行速度和延迟波动轻量化程式. 下载方式: lanzou.com/ivMJb02uthla
- yum源配置,亲测可用
yum源配置,亲测可用 最近在配置yum源发现了各种问题,网上回答太乱了,这里直接分享配置内容,拷贝内容进去即可.注意:针对centos7*版本. 具体步骤: 1.修改yum源文件(注意备份,既然不行 ...
- PVE配置GPU显卡直通(亲测可用)
PVE配置GPU显卡直通(亲测可用) 1.进入网址 2.输入用户名密码 3.点击local上传镜像 4.进入命令行模式 shell 5.换源 apt install apt-transport-htt ...
- Spoon/Kettle 连接sqlserver数据库遇到的问题 (亲测可用,图文讲解)
本文涉及到的错误: Spoon/Kettle 连接sqlserver数据库遇到的问题 (亲测可用,图文讲解) [IM002][Microsoft][ODBC 驱动程序管理器]未发现数据源名称并且未指定 ...
- Android FFmpeg移植总攻略——获取视频帧数(亲测可用)
第一次尝试使用Android 移植FFmpeg算法,一路坎坷,最终做如下总结,适用于Android手机.Android开发板.亲测可用. 一.下载组件 在Android Studio中下载所需组件:C ...
最新文章
- linux下磁盘镜像软件DRBD的使用
- VMware View 5.0从菜鸟到高手系列 10 –远程图形工作站配置篇
- 转载:JAVA 操作 Ant API
- ios fixed定位后内容不显示_HTMLCSS学习笔记(七)-- 定位与锚点
- 物联网大数据平台应具备的功能和特点
- Hyperledger Fabric介绍
- X-UA-Compatible 解决IE浏览器样式不兼容问题
- 运行jar中某个类的main方法
- tomcat设置编码为UTF-8
- 【工具】ubuntu16安装sendip发包工具,模拟发送tcp/udp/icmp报文
- 网络安全等级保护制度介绍
- 【Android】Xposed 框架解析
- Spring框架开发QQ登录教程
- ffmpeg学习日记701-报错-co located POCs unavailable
- sentinel 熔断降级
- 云上生活——数字经济万物互联
- 阿德莱德计算机专业本科,阿德莱德大学计算机科学专业详细解读 成为IT大神就靠它...
- 数据分析常用方法思路算法
- 一个输入框你要做一周?
- 攻防世界 web高手进阶区 favorite_number
热门文章
- Flash常用快捷键大全 (hotkey)
- MySQL添加服务、设置密码、修改密码
- 2048游戏C语言代码
- AUC、Precision、Recall、F-measure、Accuracy
- Ubuntu下串口通信之cutecom
- js判断是微信、QQ内置浏览器打开页面
- git 多仓库源 配置
- 双目立体匹配经典算法之Semi-Global Matching(SGM)概述:匹配代价计算之互信息(Mutual Information,MI)...
- javamail发送邮件的简单实例[转]
- 将RGB值转换为灰度值的简单算法(转)